in reply to Dots appearing when opening a directory
You can also use grep with regex match operating on readdir.for (glob('*')) { print "$_\n"; }
Change the regex to grep { /^[\w\d]/ } if you want only things that begin with a word or digit.opendir(my $dh, '.') or die $!; for ( grep { !/^\.+$/ } readdir $dh ){ print "$_\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Dots appearing when opening a directory
by marinersk (Priest) on Mar 06, 2015 at 22:04 UTC |