in reply to Re: Global variables question
in thread Global variables question
Thank you for your detailed response very well explained. As you can tell i'm quite new to this so I will work on my indenting to make my code clearer in the future. Just for my understanding... is there a difference betwen a hash and a 2D array or is a hash table more efficient? Also for the compare part I want to compare the files as you described in the last part of your answer. Would something like this be on the right lines?
my $found = 0;
foreach my $key1 (keys %hash1) {
foreach my $key2 (keys %hash2) {
if ($hash1{$key1} eq $hash2{$key2})
{
$found=1;
}
print "$found";
}
}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Global variables question
by Marshall (Canon) on Aug 24, 2010 at 16:50 UTC | |
by PerlScholar (Acolyte) on Aug 24, 2010 at 22:36 UTC | |
by Marshall (Canon) on Aug 26, 2010 at 18:43 UTC | |
by PerlScholar (Acolyte) on Aug 31, 2010 at 11:48 UTC |