Take a look at File::Spec's no_upwards method. It lets you (portably) skip the dot directories:
use strict; use warnings; use File::Spec; my @x; opendir(DIR, $dir) or die "Can't open directory $dir: $!"; eval { @x = File::Spec->no_upwards(readdir(DIR)); }; closedir(DIR); print "@x\n";
Best, beth
In reply to Re: Reading Directory
by ELISHEVA
in thread Reading Directory
by Sun751
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |