Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
and a list of files with it size$find_file = '/home/camel/file';
and now i want to find the $find_file in @list_of_files if i try@list_of_file = ('/home/camel/file 42', '/home/camel/file2 43', ...
it can't find it, i think because of the not escaped slashes in $find_fileforeach $line (@list_of_files){ if ($line =~ /$find_file/){ print ($line); } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using a Variable as a Match Expression
by wind (Priest) on Feb 16, 2011 at 17:45 UTC | |
by Anonymous Monk on Feb 16, 2011 at 18:54 UTC | |
|
Re: Using a Variable as a Match Expression
by ikegami (Patriarch) on Feb 16, 2011 at 17:30 UTC | |
| |
|
Re: Using a Variable as a Match Expression
by MidLifeXis (Monsignor) on Feb 16, 2011 at 17:46 UTC |