in reply to Regex problem

What a piece of garbage code! What on earth are you doing with @hold? Just do something like:
open my $fh => "linecount.txt" or die "Open linecount.txt: $!"; my ($file, $linecount); while (<$fh>) { ($file, $linecount) = split /\s*~\s*/; last if $file && $file eq $thefileIamLookingfor; }

Abigail

Replies are listed 'Best First'.
Re: Re: Regex problem
by DS (Acolyte) on Jul 16, 2002 at 13:28 UTC
    thanks for the help ,, my code is not garbage ,, it works somtimes :)