Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: How can I determine the size of a file?

by BastardOperator (Monk)
on Sep 25, 2000 at 19:55 UTC ( [id://33919]=note: print w/replies, xml ) Need Help??


in reply to How can I determine the size of a file?

I'm guessing that you wanted to do this from a cgi, right?

Assuming that the file is:
A) within the chroot jail made by Apache
B) readable by the user

you can do something like
my $file = "some/file"; # relative path within chroot my $fsize = (stat($file))[7]; # in bytes
<!- Added CODE tags, changed title (turnstep) -->

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://33919]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2024-04-24 16:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found