Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
now , i haw certain commands in an array!, i want to extract the line number fron file where there commands are... so i m comparing it but its not working....so far i m doing this:
it doesen't returm me any match....... i even tried with grep but it is also not working.......<while(<FILE>){ $var1=$_; foreach my $var2 (@array){ if($var1 eq $var2){ print "line is $.\n"; } } }>
can anyone help me with this!!!!!!!!
Nidhi.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: comparing array vs file
by wfsp (Abbot) on Aug 05, 2008 at 06:56 UTC | |
|
Re: comparing array vs file
by cdarke (Prior) on Aug 05, 2008 at 07:08 UTC |