Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
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?
erix has 26 version of PostgreSQL
Tux just 3
[Tux]: but I <3 the way people test here
[Tanktalus]: Tux: use sort -V to sort your perls. Looks much nicer that way ;)
[Tux]: Hmmm, pm-cb-g does not seem to accept dead-key diacriticals as all my other (perl) applications do. choroba?
[Tux]: Tanktalus this was the output of autocompletion in my tcsh
[erix]: ah, but I have different compilation- versions of Pg too, so double that: 26 * 2 = more than 50 :P
[Tanktalus]: When I showed one of my coworkers my perl list, he told me that my sort routine was broken when 5.8.8 showed up after 5.26.0 ... which made me investigate sort, which is when I found this option :)
erix atm running billion row table replication (pg-)tests...
[Tanktalus]: Tux: ah, still... :)

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (8)
As of 2017-09-25 16:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (284 votes). Check out past polls.

    Notices?