|
Laurie,
I suspect that you are not using a fully qualified filename.
The filename should include the full path to the file.
Dirk Bremer - Systems Programmer II - ESS/AMS
- NISC St. Peters USA Central Time Zone 636-922-9158 ext. 8652 fax
636-447-4471
----- Original Message -----
Sent: Wednesday, October 06, 2004
13:18
Subject: Help getting file size (sheesh)
...
I'm trying to just
determine the size of a file before I decide whether to process it.
In the following code, $size always comes out
null:
foreach $xFile (@xFileList)
{ $size = (stat
($xFile))[7]; if ($size gt 0)
{ print "
Found file $xFile with size $size, so WILL push it
...\n"; } else
{ print "
Found file $xFile with size $size, so will NOT push it
...\n"; };
I also tried $size = (-s _) instead of using "stat", but got
the same result--$size comes out null. What am I doing
wrong?
Thanks--
Laurie
|
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs