What I actually had in mind when I came up with the challenge was something like the following ... the sort of thing you find in SysAdmin magazine or Randall Schwartz's columns. #!/usr/local/bin/perl5.10 use 5.010; use strict; use warnings; use Readonly; Readonly my $DOT => q{.}; Readonly my $DOTDOT => q{..}; Readonly my $ESCAPE_BACKSLASH => q{\\}; die "USAGE: $0 rootdir.\n" unless @ARGV; my @dirs = ( @ARGV ); my %stats; while (@dirs) { my $one_dir = shift @dirs; $one_dir =~ s{(\s)}{$ESCAPE_BACKSLASH$1}g; # escape spaces for glob() ENTRY: while ( my $entry = glob "$one_dir/*" ) { next ENTRY if $entry eq $DOT or $entry eq $DOTDOT; if ( -d $entry ) { push @dirs, $entry; } else { my $size = -s _; my $len = $size == 0 ? 0 : length $size; $stats{$len}++; } } } for my $size ( sort { $a $b} keys %stats ) { my $maxsize = 10**$size; say sprintf( ' Started with some di...