but it gives me the following error :#!usr/bin/perl use strict ; use warnings ; my %hash = {'perl' => 1 , 'C' => 0} ; foreach my $key(sort keys %hash) { print "$key : $hash{$key} \n" ; }
so what is exactly the problem ?Reference found where even-sized list expected at perl.pl line 9. Use of uninitialized value $hash{"HASH(0x98bf7ec)"} in concatenation ( +.) or string at perl.pl line 12. HASH(0x98bf7ec) :
In reply to printing hash produce errors by Xfiles
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |