diff options
-rwxr-xr-x | test.pl | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/test.pl b/test.pl deleted file mode 100755 index 363f870..0000000 --- a/test.pl +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/perl -use strict; -use warnings; - -use Path::Class; - -sub trans { - my ($dir, $cb) = @_; - - while(my $file = $dir->next) { - my $outfile = $file->stringify; - - # Some conditions - next if $outfile =~ /(\.|\.\.)$/; - next if $outfile eq $dir; - - if($file->is_dir()) { - # make a directory - trans($file, $cb); - next; - } - - $cb->($file); - } -} - -sub some { - my ($f) = @_; - - die "f is empty" if !$f; - - print "Inside some: $f\n"; -} - -trans dir("in"), \&some; |