|Pathologically Eclectic Rubbish Lister|
Re: divide one file into multiple arraysby LanX (Canon)
|on Jun 25, 2013 at 17:33 UTC||Need Help??|
> print "@bad_log\n"; #currently returns entire $log
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!
( addicted to the Perl Programming Language)
╣) in the sense of "it works", not in the sense of "well coded" =)