noviceuser has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to compare two arrays which may have strings/elements separated by newline, spaces or comma, how can i ignore those special characters while comparing
e.g: suppose @array1 has contents like below
abc xyzand @array2 has contents like below
abc xyz
my $comp = Array::Compare->new; if ($comp->compare(\@array1, \@array2)) { print "array same\n"; } else { print "array not same\n"; }
Back to
Seekers of Perl Wisdom