Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
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 browsing the Monastery: (11)
As of 2016-06-28 12:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (358 votes). Check out past polls.