XP is just a number | |
PerlMonks |
Re: sort mechanismby ChOas (Curate) |
on Apr 06, 2001 at 13:01 UTC ( [id://70435]=note: print w/replies, xml ) | Need Help?? |
Hi! I hope this helps, this is what happens: 1: keys %Hash returns a list of all the keys in the hash 2: sort sorts that list 3: The foreach goes over the sorted list, presenting you the keys of the hash in sorted order is a perfectly valid way to get a list of the keys of the hash in a sorted order (provided they are numeric) btw the block that you mentioned does not operate on the hash in any real sense, you use the keys of the hash in there and yes, you can use those to access the hash. GreetZ!,
print "profeth still\n" if /bird|devil/;
In Section
Seekers of Perl Wisdom
|
|