- or download this
print shift sort @array;
- or download this
Type of arg 1 to shift must be array (not sort) at script.pl line 7, n
+ear "@array;"
- or download this
my @a = ( 4, 1, 3, 2 );
my @b = sort @a;
print shift @b;
- or download this
1. sort @a returns an array, namely the sorted version of @a.
2. shift takes an array as argument and returns a scalar.