in reply to divide one file into multiple arrays
The code is fine¹, I suppose your @sites have an empty string or so, which always matches!
try pushing the regex too, to see what matches in the dump of @bad_log.
push @bad_log, [$_,$site] if ($_ =~ /$site/);
By the way you'll get multiple entries per line if different sites match!
Cheers Rolf
( addicted to the Perl Programming Language)
¹) in the sense of "it works", not in the sense of "well coded" =)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: divide one file into multiple arrays
by tevus_oriley (Novice) on Jun 25, 2013 at 17:51 UTC | |
by LanX (Saint) on Jun 25, 2013 at 18:07 UTC |