
epiphysis
Deleted
Feb 3, 2001, 6:28 PM
Post #1 of 1
(422 views)
|
|
'stat' and file $size retrieval
|
Can't Post
|
|
I am having difficulty getting the perl stat command to work in my file upload script. 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"))[7]; print "File size is $size"; or print ((stat($filename))[7], "\n"); ( [7] 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. maybe not. thanks epi
|