User Control Panel
Advertisements

HELP US, HELP YOU!

Perl and file sizes

 
Post new topic   Reply to topic    Bot Depot Forum Index -> Perl
View unanswered posts
Author Message
draget
Not Yet a God
Not Yet a God


Joined: 29 Dec 2004
Posts: 367
Location: Australia
Reputation: 32.2Reputation: 32.2Reputation: 32.2

PostPosted: Tue Mar 22, 2005 12:20 pm    Post subject: Reply with quote

I am designing a file listing script for my website. At the moment it just lists the files in a directory and links to them, but i would like it to print the size next to it.
I'm sure there is a module, but after a lot of googling i couldn't find anything.
The server is Linux.

Any ideas?
Back to top
mat007
Almost An Agent
Almost An Agent


Joined: 12 Jan 2004
Posts: 1375

Reputation: 15.8Reputation: 15.8
votes: 2

PostPosted: Tue Mar 22, 2005 12:23 pm    Post subject: Reply with quote

Code:
# File size<br />my $size = -s "somefile.pl";<br />print "Size of somefile.pl is " . $size;


I've just finished a file size function does all the rounding etc and gives a nicely formated size.. I may realese it soon.
Back to top
draget
Not Yet a God
Not Yet a God


Joined: 29 Dec 2004
Posts: 367
Location: Australia
Reputation: 32.2Reputation: 32.2Reputation: 32.2

PostPosted: Tue Mar 22, 2005 12:28 pm    Post subject: Reply with quote

That would be good!

Thanks!
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Bot Depot Forum Index -> Perl All times are GMT
Page 1 of 1

 



Protected by phpBB Security phpBB-TweakS
phpBB Security Has Blocked 9 Exploit Attempts.
Antispam Captcha Mod by phpbb-security.com
Powered by phpBB © 2001, 2005 phpBB Group