Skip to content

Instantly share code, notes, and snippets.

@jnbek
Created April 12, 2016 21:51
Show Gist options
  • Save jnbek/40794b08924f20c8dff349b5a75a46a6 to your computer and use it in GitHub Desktop.
Save jnbek/40794b08924f20c8dff349b5a75a46a6 to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl
use strict;
use warnings;
use IO::Dir;
use Data::Dumper;
( bless {}, __PACKAGE__ )->main();
sub main {
my $self = shift;
tie my %dir, 'IO::Dir', ".";
foreach ( keys %dir ) {
next if $_ =~ m/^\./;
print $_, " ", $dir{$_}->size, "\n";
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment