Hi
I am searching through a text file to find out if any elements of the array are present in the line. If found, it has to be printed to a file. I used the following code
for ($x=0; $x <= $#all; $x++) { if($line =~ /@all[$x]/g) { print F2 $line; }
In the output, I get only value of @all[$x]. I need to print the complete line. Can anyone help me out?
In reply to Searching and printing through a array by rsriram
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |