in reply to parsing from a file
I think you posted to the wrong section, but oh well.
Your code should read something like this:
#!/usr/local/bin/perl -w use strict; # never, never leave home without it. my ($currentLine, $name); #not needed because not used!! my $infilename = "temp1.pl"; open (INFILE, "$infilename") || die "Thanks for pointing this out chromatic: $!"; while (<INFILE>) { if (/^Total/) { my @values = split; #do something with $value[3] and $value[4]; } }
Didn't I answer this on another node?
J. J. Horner Linux, Perl, Apache, Stronghold, Unix jhorner@knoxlug.org http://www.knoxlug.org/
|
|---|