Don't ask to ask, just ask | |
PerlMonks |
Re: how to print key and value of hash as it isby vinoth.ree (Monsignor) |
on Jun 03, 2016 at 07:48 UTC ( [id://1164839]=note: print w/replies, xml ) | Need Help?? |
Hi
Add, use strict;use warnings; then run your code ? "my" variable %hash masks earlier declaration in same scope at testt.pl line 14. syntax error at testt.pl line 12, near "while{" Can't use "my $a" in sort comparison at testt.pl line 17.Update: Hashes are not ordered, but as usual, CPAN offers a solution: Tie::IxHash All is well. I learn by answering your questions...
In Section
Seekers of Perl Wisdom
|
|