DS has asked for the wisdom of the Perl Monks concerning the following question:
I want to read that file and catch the first low.pl and sethi.pl ~ 6454 low.pl ~ 757 cow.pl ~ 43 low.pl ~ 757
I am doing something like thismy $file = low.pl; my $lineCount = 757;
however, I don't get the value , it keeps returning null .. thanks for help or ideas.open(INFILE, "linecount.txt") my @hold; while (<INFILE>) { push(@hold, $1)&& last if (m/$thefileIamLookingfor/); } $value = join(' ', @hold); my( $file, $linecount) = split(/~/, $value);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Regex problem
by chromatic (Archbishop) on Jul 16, 2002 at 04:57 UTC | |
|
Re: Regex problem
by zejames (Hermit) on Jul 16, 2002 at 05:13 UTC | |
by DS (Acolyte) on Jul 16, 2002 at 13:26 UTC | |
|
Re: Regex problem
by Abigail-II (Bishop) on Jul 16, 2002 at 10:08 UTC | |
by DS (Acolyte) on Jul 16, 2002 at 13:28 UTC |