Help for this page

Select Code to Download


  1. or download this
      foreach my $file ( sort {
        my($as,$an) = $a =~ /^(\D*)(\d+)/;
        my($bs,$bn) = $b =~ /^(\D*)(\d+)/;
        $as cmp $bs or $an <=> $bn
      } keys %hash )
    
  2. or download this
      foreach my $file (
        map { $_->[0] }
        sort { $a->[1] cmp $b->[1] or $a->[2] <=> $b->[2] }
        map { [ $_, /^(\D*)(\d+)/ ] }
        keys %hash )