Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

RE: Empty directory

by Maqs (Deacon)
on May 15, 2000 at 17:35 UTC ( #11609=note: print w/ replies, xml ) Need Help??


in reply to Empty directory

Another way :

if (scalar `ls $dirname`) {print "Directory $dirname is not empty\n"};

--
With best regards
Maqs.


Comment on RE: Empty directory
Download Code
RE: RE: Empty directory
by merlyn (Sage) on May 15, 2000 at 21:27 UTC
    1) useless use of scalar

    2) dangerous use of interpolation into a backquoted string, for no real gain

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2014-10-21 04:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (95 votes), past polls