Questions about this topic? Sign up to ask in the talk tab.
Difference between revisions of "Perl/Basics/Hashes/Helper Functions/Keys"
From NetSec
AlizaLorenzo (Talk | contribs) (Created page with "This uses a foreach() loop and casting. We can isolate $key=>$value pairs the same as above using keys in stead of each: {{code|text=<syntaxhighlig...") |
Chantal21I (Talk | contribs) |
(No difference)
|
Latest revision as of 00:39, 19 July 2012
This uses a foreach() loop and casting. We can isolate $key=>$value pairs the same as above using keys in stead of each:
<syntaxhighlight lang="perl">foreach my $key (@{sort keys %user}) { print "Key: $key, Value: ". $user{$key} ."\n"; };</syntaxhighlight> |