Feb 3, 2001, 6:28 PM
Post #1 of 1
I am having difficulty getting the perl stat command to work in my file upload script.
'stat' and file $size retrieval
from research I have done, I understand that using stat in order to find file attributes such as filesize and last modified etc.. you need to formulate it something like this:
$size = (stat("size.pl"));
print "File size is $size";
print ((stat($filename)), "\n");
(  being the assigned integer for filesize. )
I have a file upload script and I need to have the file size for each file that has been uploaded and added to the output template (file listing) to show the filesize.
The script has 4 pl files. One to add a file, the prefs file, an admin file and another file that handles sorting and searching the file listing (there's a search form)
Maybe someone can take a look at the .pl that handles the upload of files and let meknow where and how I should use the stat command to print filesize.