good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: removing the need for tmp files from scriptby hippo (Bishop) |
on Jul 22, 2016 at 16:29 UTC ( [id://1168373]=note: print w/replies, xml ) | Need Help?? |
push $item, $_ if /$pattern/; Pushing to a scalar (which isn't an array ref) is an error. Just use an array instead. Same goes for your foreach postfix. Don't declare $item inside and outside the loop unless you intend them to be different variables. And maybe think about an alternative style of indenting? Good luck.
In Section
Seekers of Perl Wisdom
|
|