Please read some of the links that are provided below the text entry box when you are composing a post; learn to use the "code tags" (<code> or <c>), placing them
only around your code snippets,
not around your entire post. Please do not use <pre> tags at all.
If you are going to present us with error messages that include line numbers, you should indicate in your code which lines those numbers represent. I'm guessing that the two messages you quoted -- which are actually warnings (not errors) -- refer to the two lines marked below:
my $one_number = $numbers[$hashtable{$name} - 1]; # line 24
if ( $one_number >= 20 ) {
print "$name $hashtable{$name} $one_number\n"; # line 26
}
This would suggest that those messages resulted from an iteration of your
while <FD> loop in which the variable "$name" was set to a value that happened to be non-existent as a key in "%hashtable". If you change your test condition from this:
next if ! s{ \A (\S+) \s+ (?= \d ) }{}xms;
to something like this instead:
next unless ( s{ \A (\S+) \s+ (?= \d ) }{}xms and exists( $hashtab
+le{$1} ));
then the warnings should go away (and you might end up with fewer lines of printed output).
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.