my @a = (qw/a b c d e f/); my @b = (qw/a b d/); print comp( \@a, \@b ); sub comp { my ( $aref, $bref ) = @_; for ( 0 .. $#$bref ) { return if ( not exists( $aref->[$_] ) or $aref->[$_] ne $bref->[$_ +] ); } return 1; }
In reply to Re: List Compare
by borisz
in thread List Compare
by anniyan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |