Help for this page

Select Code to Download


  1. or download this
    print shift sort @array;
    
  2. or download this
    Type of arg 1 to shift must be array (not sort) at script.pl line 7, n
    +ear "@array;"
    
  3. or download this
    my @a = ( 4, 1, 3, 2 );
    my @b = sort @a;
    print shift @b;
    
  4. 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.