Help for this page

Select Code to Download


  1. or download this
      my @img = map  { $_->[0] }
                sort { $tsort{$Option{thumbsorting}}->() }
    ...
                # convert can't deal with .ico files (yet)
                # Tk can deal with Tiff/NEF as of 804.027_501 with Tk::TIF
    +F
                grep m/\.(jpe?g|gif|x[pb]m|png|bmp|tiff?|nef)$/i => @file_
    +names;
    
  2. or download this
    @out = map substr ($_, 1 + rindex $_, "\0") =>
           sort =>
           map "\L$_\E\0$_" =>
           @in;
    
  3. or download this
    # sort file names by the (first) sequence of digits, then by size
    my @sorted = map  { $_->[0],
    ...
                 map  { m/(\d+)/; # sort by digits in file name
                        [ $_, pack "l>l>", $1 || 0, -s $_ ] }
                 @filelist;