Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: perl script to print just directory names

by blue_cowdawg (Monsignor)
on Dec 06, 2012 at 20:33 UTC ( #1007647=note: print w/ replies, xml ) Need Help??


in reply to perl script to print just directory names

What extra line? Just tested your code on my system and don't see an extra line. There *is* however a "blank line" between the last line the script generates and the command line prompt but I think that's a function of the shell.

Some more comments:

Not sure why you are doing this:

while(defined($file = readdir($dh)))
when
while($file = readdir($dh))
should suffice.

You do realize your array is going to be empty when your loop is done?


Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg


Comment on Re: perl script to print just directory names
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (16)
As of 2015-07-29 15:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (263 votes), past polls