Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^3: storing grep output to variable

by wolv (Pilgrim)
on Jun 09, 2004 at 13:27 UTC ( [id://362724]=note: print w/replies, xml ) Need Help??


in reply to Re^2: storing grep output to variable
in thread storing grep output to variable

That's the solution I would use myself. I'd just like to make a note that FILE type filehandles are global. Instead of globals you should use a lexical filehandle: open my $file, '<', $filename or die $!. See perldoc -f my and perldoc perlsub (Private Variables via my()) for an explanation of globals and lexicals.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2024-05-30 06:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found