in reply to line by line match on an array of strings
local $/ = undef; open(FH,"<","test.txt") or die "Could not open the file due to $!"; my $fcontent = <FH>; close FH; foreach (@typedefs) { if ($fcontent =~ /$_/){ # perform various actions here if line match } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: line by line match on an array of strings
by halley (Prior) on Jan 09, 2008 at 14:20 UTC |