in reply to Re: Stat and file size
in thread Stat and file size
I got it working...thanks.
$testfolder = '.\test'; $test =~ s/\//\\/g; opendir Sdir, $testfolder; @files = readdir(Sdir); undef @newfiles; foreach $file (@files) { $full_pathname = $testfolder . "/" . $file; my ($filesize) = (stat $full_pathname)[7]; if ($filesize > 0) { $full_pathname = $testfolder . "/" . $file; if (-e $full_pathname) { @newfiles = (@newfiles,$file); } } } foreach $file (@newfiles) { print "$file\n"; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Stat and file size
by tokpela (Chaplain) on Jul 29, 2012 at 16:12 UTC | |
Re^3: Stat and file size
by Kenosis (Priest) on Jul 28, 2012 at 20:12 UTC |
In Section
Seekers of Perl Wisdom