S
Shashank Khanvilkar
Hi,
I have a program fragment like this...
----------------------------------------
%HoH = ();
sub1(\%HoH); #Passing the Hoh by reference...
print "size of hash: " . keys(%HoH) . ".\n";
........
sub1{
my $a = @_;
$a->{A}->{1} = 10;
$a->{B}->{2} = 20;
}
----------------------------------------
Since i am passing the Hoh by reference, the print statement should
display 2. However in my case, it gives size of hash as "0"..
what am i doing wrong?
Any help is appreciated.
Regards
Shashank
I have a program fragment like this...
----------------------------------------
%HoH = ();
sub1(\%HoH); #Passing the Hoh by reference...
print "size of hash: " . keys(%HoH) . ".\n";
........
sub1{
my $a = @_;
$a->{A}->{1} = 10;
$a->{B}->{2} = 20;
}
----------------------------------------
Since i am passing the Hoh by reference, the print statement should
display 2. However in my case, it gives size of hash as "0"..
what am i doing wrong?
Any help is appreciated.
Regards
Shashank