to this:while(<IN2>) { chomp; print "$_ is a new site\n" if not defined($newsite1{$_}); } # while
Checking for the existence of a key is quicker than looking up the value of a hash element.while(<IN2>) { chomp; print "$_ is a new site\n" unless exists $newsite1{$_}; } # while
In reply to Re: Re: Comparison Of Files
by runrig
in thread Comparison Of Files
by ImpalaSS
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |