Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Getting file size

by broquaint (Abbot)
on Sep 24, 2002 at 20:19 UTC ( [id://200480]=note: print w/replies, xml ) Need Help??


in reply to Getting file size

Have you checked to see if an error has occurred e.g
defined(my $size = -s $filename) or die "ack: $!"; # or using stat() defined(my $size = [stat $filename]->[7]) or die "ack: $!";
As this is the most likely cause of your missing filesize.
HTH

_________
broquaint

update: changed code to check definedness instead of the truthfulness of size ... hmm I'm sure there's a joke in their somewhere

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2024-04-19 10:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found