Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: In-Place Editing Problem (*ARGV)

by tye (Sage)
on Oct 24, 2014 at 01:30 UTC ( [id://1104824]=note: print w/replies, xml ) Need Help??


in reply to In-Place Editing Problem

If *ARGV is already open, then the next <> would continue reading from it before looking for the next file name in @ARGV. So you probably used <> before you called the subroutine that you described.

You could close *ARGV, but that would disrupt the other code that was already using <> to read from STDIN. So you might instead want to do local( *ARGV ) in your subroutine before you assign to @ARGV.

- tye        

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2024-04-19 22:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found