Let's say that you want to know whether module Tie::Hash is installed. To find out, execute the following from the command line:
perl -MTie::Hash -e 1
Source
petrichor (/'pe - tri - kor'/) is the familiar scent of rain on dry earth
this tech blog is the wafting fragrance of my geeky outpourings, one post at a time
Let's say that you want to know whether module Tie::Hash is installed. To find out, execute the following from the command line:
perl -MTie::Hash -e 1
unless ( arrays_are_equal (\@tmp1, \@tmp2) ){
print "\ntmp1 and tmp2 are not equal!\n";
}
else {
print "\ntmp1 and tmp2 are indeed equal!\n";
}
sub arrays_are_equal {
my ($first, $second) = @_;
no warnings; # silence spurious -w undef complaints
return 0 unless @$first == @$second;
for (my $i = 0; $i < @$first; $i++) {
return 0 if $first->[$i] ne $second->[$i];
}
return 1;
}