P
phal
Dear Guru
I have two array
my @array1=(1,2,3,4,5,6);
my @array2=(1,4);
my %temp;
for(my $x=0; $x<@array1; $x++)
{
if(@array2!=~/$array1[$x]/)
{
$temp{$array1[$x]}=$array1[$x];
}
next if(@array2 =~ /$array1[$x]);
}
If any information already record in the @array2, then %temp will not
record that data, so the result so be
%temp=(2=>2,3=>3,5=>5,6=>6);
but it does work, coz it just record all the information
I have two array
my @array1=(1,2,3,4,5,6);
my @array2=(1,4);
my %temp;
for(my $x=0; $x<@array1; $x++)
{
if(@array2!=~/$array1[$x]/)
{
$temp{$array1[$x]}=$array1[$x];
}
next if(@array2 =~ /$array1[$x]);
}
If any information already record in the @array2, then %temp will not
record that data, so the result so be
%temp=(2=>2,3=>3,5=>5,6=>6);
but it does work, coz it just record all the information