There's more than one way to do things | |
PerlMonks |
Re: Putting files in an Arrayby Kenosis (Priest) |
on Jul 11, 2012 at 15:48 UTC ( [id://981175]=note: print w/replies, xml ) | Need Help?? |
My text file looks something like this... (only IP addresses shown) Perhaps I'm missing something, but you push a line onto an array if($_ =~m/head/), but there's no such match in the lines you've shown, so none of those IPs would end up in the array. Were you, in fact, only interested in those lines with "head" in them? Update: Ken was much faster at this observation...
In Section
Seekers of Perl Wisdom
|
|