Note that use warnings; is the preferred way of turning warnings on in modern Perl, along with lexical file handles, three parameter open and use strict;. In particular, don't use -w on the command line or in the shebang line at the start of the script.
Actually, you should always use both strictures (use strict; use warnings; - see The strictures, according to Seuss), not just warnings.
If you were paying attention you would see that the OP was already using warnings and that the other style recommendations were made and illustrated in replies.
Update: oh, and you can link to Perl documentation using [doc://perldiag] - see Linking on PerlMonks.
In reply to Re^2: Code for generating a word frequency count not working
by GrandFather
in thread Code for generating a word frequency count not working
by Pearl12345
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |