my @a1 = qw( a b c ); my @a2 = qw( a b c ); is_array_equal(\@a1, \@a2); sub is_array_equal { my ($a1, $a2) = @_; print "a: @_\n"; print "a1: $a1\n"; print "a2: $a2\n"; }