my @arr = [1];
This creates an array with one item in it -- and that item is an array reference to an anonymous array (created by using square brackets) containing your 1. You probably should've gone with my @arr = (1);
wrap(\@arr);
That's fine - it passes a reference to your @arr array.
sub wrap {
my @a = @_;
You don't dereference this, so now your @a array contains an array reference containing an array reference containing 1. Your array would look something like this: @a = ( [ [ 1 ] ] )
push @a, 2; # @a = ([[1]], 2);
unshift @a, 0; # @a = (0, [[1]], 2);
Inside wrap you'd have a scalar array reference in the arguments, so you'd put it in a scalar instead of an array:
my ($aref) = @_; # or: my $aref = shift;
and dereference it with a leading @:
push @$aref, 2;
unshift @$aref, 0;
See also perldoc perlref.