in reply to Re: perl beginner question
in thread perl beginner question
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"; } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: perl beginner question
by CountZero (Bishop) on May 24, 2009 at 11:39 UTC |