in reply to Re: Cleaning up a text file with compact regex
in thread Cleaning up a text file with compact regex
while (<$fh>)
You should always put local($_); before such a loop, because the global variable $_ is set to each line and is not cleaned up in the end.
Update: http://perl.plover.com/local.html has an example of the dangers of this kind of while loop.
|
|---|