Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: how can i also show sub folders

by tstock (Curate)
on Nov 21, 2001 at 13:21 UTC ( [id://126741]=note: print w/replies, xml ) Need Help??


in reply to how can i also show sub folders

A few notes:

. You can avoid doing stat twice by using the _(underscore) handle:
@stat = stat(_); # the -f test did a stat on the same file


. you can use spritf to simplify your code:
if ($stat[7] > 1000) { $stat[7] = sprintf( "%d KB", int($stat[7] * .001) ); }

Someone else in this monastery will mention the use strict, use warnings, -w, CGI.pm, HTML::Template stuff :)

Tiago

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (9)
As of 2024-04-18 08:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found