Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    
    ...
    my @sorted = sort { $filesize{$b} <=> $filesize{$a} } keys %files;
    
    printf "Largest file: %s (%d bytes)\n", $sorted[0], $filesize{$sorted[
    +0]};
    
  2. or download this
    #!/usr/bin/perl
    
    ...
    printf( "Largest file that matches %s is %s (%d bytes)\n",
            $glob_pattern, $sorted[0], $files{$sorted[0]} );
    
  3. or download this
    show-biggest '/tmp/dir1/d1*'   # note the single quotes
    # or:
    show-biggest /tmp/dir1/d1\*   # note the backslash escape for "*"
    
  4. or download this
    my @files = <something>;
    
  5. or download this
    my $glob = "something";
    my @files = glob( $glob );