Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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 rifling through the Monastery: (1)
As of 2016-08-30 04:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The best thing I ever won in a lottery was:















    Results (410 votes). Check out past polls.