Willman023 has asked for the wisdom of the Perl Monks concerning the following question:
but when I run this, and print out to file it's just blank between the parenthesis. print OUTFILE "($size)"; So is there any other way to get a file's size, and how come its blank and I don't get an error or some indication that something is wrong? Thanks so much!$size = -s "$filename"; and someone eluded to: $size = (stat("$filename"))[7];
Edit by dws to add <code> tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Getting file size
by Aristotle (Chancellor) on Sep 24, 2002 at 20:18 UTC | |
|
Re: Getting file size
by broquaint (Abbot) on Sep 24, 2002 at 20:19 UTC | |
|
Re: Getting file size
by thelenm (Vicar) on Sep 24, 2002 at 20:17 UTC | |
|
Re: Getting file size
by vladb (Vicar) on Sep 24, 2002 at 20:17 UTC | |
|
Re: Getting file size
by kabel (Chaplain) on Sep 24, 2002 at 20:25 UTC | |
by Aristotle (Chancellor) on Sep 24, 2002 at 20:28 UTC | |
by kabel (Chaplain) on Sep 24, 2002 at 20:51 UTC | |
by Willman023 (Scribe) on Sep 24, 2002 at 21:25 UTC | |
by kabel (Chaplain) on Sep 25, 2002 at 08:01 UTC | |
|
Re: Getting file size
by MZSanford (Curate) on Sep 24, 2002 at 21:30 UTC | |
by Anonymous Monk on Sep 24, 2002 at 23:21 UTC | |
by grantm (Parson) on Sep 25, 2002 at 09:00 UTC |