in reply to if statement comparing elements of arrays?

it might help to inspect your arrays with Data::Dumper
use Data::Dumper ; my @arr = qw(1 2 3 4 5) ; print Dumper(\@arr) ;