Beware of the newline.
If there is a trailing newline, and there should be according to perlfaq5/"How do I count the number of lines in a file?", you'll get an extra key "\n" with value undef. The obvious way to handle this is to first store the line in a variable, chomp() it, then split() it. A split on /[|\n]/ would work too, but I'd prefer chomp()ing.
ihbIn reply to Re: Re: Messing with hashes
by ihb
in thread Messing with hashes
by FireBird34
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |