Sonika Sachdeva wrote:
> Hi,
Hello,
> I have Hash of array. I want to compare the array values within the hash.
> How can it be done?
>
> if ($eline =~ /$pattern/ ) {
> $eline =~ /(.*)\"(\w+)\s(.*)\?(.*)\"/ ; my $uniq=$1; my
> $url=$4;
You shouldn't use the numerical variables i
Sonika Sachdeva wrote:
I have Hash of array. I want to compare the array values within the hash.
How can it be done?
if ($eline =~ /$pattern/ ) {
$eline =~ /(.*)\"(\w+)\s(.*)\?(.*)\"/ ; my $uniq=$1; my
$url=$4;
chomp($uniq);chomp($url);
my @var= (
You need to dereference the array at $var{$key} in a similar way to the
way you did it when you created the array, so something like this should
work:
foreach my $key(keys %VAR){
foreach my $element(@{$VAR{$key}}){
#do something...
}
}
-Original Message-
From: Sonika Sachdeva