There's more than one way to do things | |
PerlMonks |
Re: Searching Line by Line Multiple Timesby snopal (Pilgrim) |
on Aug 01, 2007 at 19:48 UTC ( [id://630154]=note: print w/replies, xml ) | Need Help?? |
After going through your <STDIN> handle once, you are now at the EOL position, meaning no more data can be read from your handle. You would be better off reading <STDIN> contents into an ARRAY and then looping through that ARRAY in your foreach.
In Section
Seekers of Perl Wisdom
|
|