in reply to Finding wether all elements of one array are in another
Hi tsk1979, Try this,
use strict; use warnings; use Array::Compare; my @ar1 = qw(-true -depth=1); my @ar2 = qw(-search -depth=1 -true -expand_all); my $comp = Array::Compare->new(); if ($comp->compare(\@ar1, \@ar2)){print "Same Array OK";}else{print " +Different Array OK";}
Updated davorg solution is correct. compare function compare the arrays in order.
Regards,
Velusamy R.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Finding wether all elements of one array are in another
by davorg (Chancellor) on Mar 31, 2006 at 09:48 UTC |