sub removedir { my $dir= shift; opendir DIR, $dir or die "opendir $dir: $!"; for (readdir DIR) { next if /^\.{1,2}$/; my $path = "$dir/$_"; #check $path is a file? if(-f $path) { print "file: $path\n"; } } }
In reply to Re^2: perl beginner question
by Anonymous Monk
in thread perl beginner question
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |