The stupid question is the question not asked | |
PerlMonks |
Re^3: Print something when key does not existby NetWallah (Canon) |
on Apr 06, 2014 at 04:51 UTC ( [id://1081287]=note: print w/replies, xml ) | Need Help?? |
++ for asking good questions. Yes the !@F handles blank lines. When split, these will leave the @F array unpopulated, so scalar(@F) will be 0, or false, and the line gets skipped.
The %h is a Hash of Hashes. the outer "for sort keys %h" handles the first (outer) hash. This is pretty much the same thing kcott does in his line: except - my code does not worry about non-existing keys - since I run without 'warnings', my code does the right thing without complaint.
What is the sound of Perl? Is it not the sound of a wall that people have stopped banging their heads against?
In Section
Seekers of Perl Wisdom
|
|