good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Help Me!by jwkrahn (Abbot) |
on Apr 10, 2011 at 04:23 UTC ( [id://898563]=note: print w/replies, xml ) | Need Help?? |
Very good start! These pragmas should be at the beginning of every Perl program. (Note that it is spelled Perl, not PERL.)
You should usually use the three argument form of open and lexically scoped filehandles and you should probably include the file name in the error message so you know which file failed to open.
You have a variable in void context which should trigger a warning message.
Why are you modifying $_ in this loop when you could just use $word directly?
And since you are also using $_ in the outer loop then this could cause problems in some situations so you should probably avoid using $_ if you can:
And if you are modifying single characters then the tr/// operator is usually more efficient than the s///g operator. According to your explanation and data you probably need something like this:
In Section
Seekers of Perl Wisdom
|
|