- 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]};
- or download this
#!/usr/bin/perl
...
printf( "Largest file that matches %s is %s (%d bytes)\n",
$glob_pattern, $sorted[0], $files{$sorted[0]} );
- or download this
show-biggest '/tmp/dir1/d1*' # note the single quotes
# or:
show-biggest /tmp/dir1/d1\* # note the backslash escape for "*"
- or download this
my @files = <something>;
- or download this
my $glob = "something";
my @files = glob( $glob );