Just another Perl shrine | |
PerlMonks |
Re: populating a HoA with regexpby Athanasius (Archbishop) |
on Aug 28, 2012 at 15:06 UTC ( [id://990261]=note: print w/replies, xml ) | Need Help?? |
Hello asqwerty, and welcome to the Monastery! You already have the answer you were looking for. I just want to point out that the line:
is incorrect. You can see this by printing the contents of %dfs (using Data::Dumper) immediately after that line:
When interpolated into an array or hash, the empty list () effectively disappears. I think you meant to write:
which works correctly, although
also works. Here is some good advice: Get into the habit of including the lines
at the head of every script. In this case, warnings would have shown you the problem:
Hope that helps, Athanasius <°(((>< contra mundum
In Section
Seekers of Perl Wisdom
|
|