Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

can any bosy help me out!!

by asdfghjkl (Initiate)
on Dec 06, 2007 at 11:02 UTC ( [id://655360]=note: print w/replies, xml ) Need Help??


in reply to selcting all files in a given directory except......

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: can any bosy help me out!!
by johngg (Canon) on Dec 06, 2007 at 11:39 UTC
    As roboticus mentions, something like

    @files = grep { ! /^\.\.?$/ } readdir $DIR;

    would have been simpler and easier to understand. Also, your choice of $dir and $DIR as variable names could lead to confusion.

    Cheers,

    JohnGG

Re: can any bosy help me out!!
by roboticus (Chancellor) on Dec 06, 2007 at 11:27 UTC
    asdfghhjkl:

    It worked for me ... what did you expect to see? (Though I would've used a simpler condition than you chose...)

    ...roboticus

    Update: Specifically: !/^\.\.?$/

Re: can any bosy help me out!!
by roboticus (Chancellor) on Dec 06, 2007 at 11:51 UTC
    asdfghjkl:

    Hmmm ... why did you repost the same question? You've already got plenty of helpful answers there...

    ...roboticus

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (5)
As of 2024-04-26 07:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found