Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
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.

Replies are listed 'Best First'.
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 avoiding work at the Monastery: (4)
As of 2016-07-29 07:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What is your favorite alternate name for a (specific) keyboard key?


















    Results (260 votes). Check out past polls.