All pastes #2096886 Raw Edit

Anonymous

public text v1 · immutable
#2096886 ·published 2011-12-28 10:48 UTC
rendered paste body
#!perl -w
use strict;

my @new = ();

get_file($ARGV[0]);

sub get_file {
    my ($dir) = @_;
    use File::Find;
    finddepth(\&wanted, $dir);
    sub wanted {
        if (-f $_ && -s $_) {
            my $basename = $_;
            push @new, $basename;
      }
    }

    open LOG, '>log' or die $!;
    foreach my $new (@new)
    {
        print LOG "$new\n";
    }

    # chmod (0750, "log");
    close (LOG);
}