Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: removing the need for tmp files from script

by hippo (Bishop)
on Jul 22, 2016 at 16:29 UTC ( [id://1168373]=note: print w/replies, xml ) Need Help??


in reply to removing the need for tmp files from script

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1168373]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-19 03:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found