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?? |
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
In Section
Seekers of Perl Wisdom
|
|