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