Through all your suggestions, I learned that the problem was my xFileList
didn't have fully-qualified file names in it. Once I changed that, it
worked like a charm.
Thanks
very much, everyone.
Laurie
-----Original Message-----
From: Laurie Vien
Sent: Wednesday, October 06, 2004 2:19 PM
To: [EMAIL PROTECTED]
Subject: Help getting file size (sheesh) ...
From: Laurie Vien
Sent: Wednesday, October 06, 2004 2:19 PM
To: [EMAIL PROTECTED]
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";
};
$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
