in reply to can any bosy help me out!!
in thread selcting all files in a given directory except......

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