Loading ...
Sorry, an error occurred while loading the content.
 

Re: [PBML] Re: Checking for lines in a file

Expand Messages
  • Charles K. Clarkson
    ... From: To: Sent: Monday, October 01, 2001 10:46 AM Subject: [PBML] Re: Checking for lines in a file
    Message 1 of 3 , Oct 1, 2001
      ----- Original Message -----
      From: <ggarri2910@...>
      To: <perl-beginner@yahoogroups.com>
      Sent: Monday, October 01, 2001 10:46 AM
      Subject: [PBML] Re: Checking for lines in a file


      : Hey Charles-
      :
      : I'm running 5.003 on my AIX server.
      :

      Then you'll have to go back to the old open statement:

      #!/usr/bin/perl -w
      use strict;
      use diagnostics;

      my $file_name = 'select.txt';
      open FH, $file_name or die "Can't open $file_name: $!.";

      while (<FH>) {
      print "while loop \n";
      next unless (/^\s*\d{4}-/);
      print "First Blau!\n";
      print " $_ " for split;
      print "\n";
      }

      close FH;

      __END__


      Let me know if it works now.


      HTH,
      Charles K. Clarkson
      Clarkson Energy Homes, Inc.
    Your message has been successfully submitted and would be delivered to recipients shortly.