Help for this page

Select Code to Download


  1. or download this
    # poorly implementing VBScript's 'trim' function:
    
    ...
        $_[0] =~ s/^\s*//;
        $_[0] =~ s/\s*$//;
    }
    
  2. or download this
    my @array = qw/ 1 2 3 4 5 /;
    my @new_array = sort { $a++ <=> $b-- } @array;