in reply to Re: no size with stat and lstat in windows
in thread no size with stat and lstat in windows
I'm running this code
use strict; my $dir = "c:\\params"; opendir DIR, $dir or die $!; foreach my $file (readdir(DIR)){ unless(-d $file){ print $file; my @stats = lstat ($file); print "\t\$stat = $stats[7]\n"; } }
And get this
AMRO $stat = DATE CATEGORY $stat = NEON $stat = PARAMIN.pm $stat = 1137 SMSL $stat = SMSREPSMEMIDCTOTS10.TXT $stat = SMSREPSMEMIDCTOTS11.TXT $stat = SMSREPSMEMIDCTOTS12.TXT $stat = SMSREPSMEMIDCTOTS13.TXT $stat = SMSREPSMEMIDCTOTS14.TXT $stat = tp1.pl $stat = 247
Which has 2 errors no stats for the TXT files and NEON and SMSL are directories but . and .. are filtered out.
Anyone seem this at all
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: no size with stat and lstat in windows
by shenme (Priest) on Sep 20, 2004 at 19:41 UTC | |
by Scarborough (Hermit) on Sep 21, 2004 at 12:42 UTC |