in reply to any replacements for smartmatch on comparing two arrays

Hello ramachandrajr,

See also perlfaq4. Here is one (not necessarily optimal) way, using 2 modules:

#! perl use strict; use warnings; use List::Util qw( pairfirst ); use List::MoreUtils qw( mesh ); my @array1 = qw( a e i o u ); my @array2 = qw( a e i o u ); my $found = @array1 == @array2 && ! pairfirst { $a ne $b } mesh @arra +y1, @array2; print $found ? 'Match' : 'No match', "\n";

Output:

18:12 >perl 1380_SoPW.pl Match 18:12 >

Hope that helps,

Update (13 Aug 2020): Fixed broken link.

Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,