Help for this page

Select Code to Download


  1. or download this
    # given the string value in $_ ...
    
    my @v = split m#/#;
    unshift @v, shift(@v) =~ /^(.*?)(\d*)$/;
    
  2. or download this
        sprintf "%-4s%3d%3d%3d", @v;
    
  3. or download this
      map { $_->[1] }
      sort { $_->[0] cmp $_->[1] }
    ...
        no warnings; # in case @v has less than 4 elements
        [ sprintf( "%-4s%3d%3d%3d", @v ), $_ ]
      }