more useful options | |
PerlMonks |
Re^4: number of keys and values in a hashby pvaldes (Chaplain) |
on Oct 11, 2011 at 15:47 UTC ( [id://930847]=note: print w/replies, xml ) | Need Help?? |
Some extra notes about your code: while (my ($keys, $values) = each %nums) {is probably a little more readable than while ((my $keys, my $values) = each (%nums)) {and you could prefer also to use open my $file, 'formal.xml'; instead: my $file;open $file, 'formal.xml');and print "num: $number\n"; instead: print( "num: $number\n" );
In Section
Seekers of Perl Wisdom
|
|