Welcome to the Monastery | |
PerlMonks |
Re: Bad Module Codeby ihb (Deacon) |
on Jul 12, 2003 at 15:18 UTC ( [id://273634]=note: print w/replies, xml ) | Need Help?? |
You've been given many comments and suggestions, so I won't second them. What I find most upsetting with the code though is that it doesn't localize FH and $_. That is bad, bad, bad. Forgetting to localize $_ is far too common. See Localizing $_ and while (<FH>) { ... }. (Is really: "Re: Re4: matching every occurrence of a regex") for a brief list of (core/common) modules that at that time didn't localize $_--potentially causing bugs in the user's program. ihb
In Section
Seekers of Perl Wisdom
|
|