stort83 has asked for the wisdom of the Perl Monks concerning the following question:
cheers Stort##################### # lines is solution.java # lines2 is input for ($a=0; $a<$#lines+1; $a++){ for ($b=0; $b<$#lines2+1; $b++){ if ($lines[$a] =~ /$lines2[$b]/) { print $lines[$a]; print "\nyes ", $lines2[$b], " exists\n\n"; } } } #####################
2006-02-21 Retitled by g0n, as per Monastery guidelines
Original title: 'arrays and variables'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Improving a script to search for keywords in a file
by brian_d_foy (Abbot) on Feb 19, 2006 at 19:09 UTC | |
|
Re: Improving a script to search for keywords in a file
by GrandFather (Saint) on Feb 19, 2006 at 20:41 UTC | |
by Anonymous Monk on Feb 19, 2006 at 23:18 UTC | |
by GrandFather (Saint) on Feb 20, 2006 at 01:09 UTC | |
by graff (Chancellor) on Feb 20, 2006 at 01:42 UTC |