P
pamelamishra
Hi,
I have this question about Perl references.
Suppose i have this %hash which has been populated with key -
values.Subroutine check1 gets the %hash as a refrence from the main
and this refrence has to be passed to another subroutine check2. How
can this be done.Any suggestions would be helpful.
##############################
my %hash;
check1(\%hash);
sub check1
{
my ($hash)=shift;
foreach my $keys (keys $hash)
{
print"$hash{$keys}\n";
}
check2 (I want to send the reference of %hash--which is already a
reference);
}
sub check2
{
my ($hash)=shift;
}
######################
Thanks
I have this question about Perl references.
Suppose i have this %hash which has been populated with key -
values.Subroutine check1 gets the %hash as a refrence from the main
and this refrence has to be passed to another subroutine check2. How
can this be done.Any suggestions would be helpful.
##############################
my %hash;
check1(\%hash);
sub check1
{
my ($hash)=shift;
foreach my $keys (keys $hash)
{
print"$hash{$keys}\n";
}
check2 (I want to send the reference of %hash--which is already a
reference);
}
sub check2
{
my ($hash)=shift;
}
######################
Thanks