The_Last_Monk has asked for the wisdom of the Perl Monks concerning the following question:
The directory has a text file in it, but once it opens the directory, the output is this:$dir = path to the directory opendir (DIR,$dir) or die "dead"; while(my $text = readdir DIR) { print "$file\n" }
What would be a solution to get rid of those dots? Is there a regex that should be used here so that it only prints the files starting with a word or a number? If so, what would be the regex?. .. File.txt
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Dots appearing when opening a directory
by LanX (Saint) on Mar 06, 2015 at 16:54 UTC | |
|
Re: Dots appearing when opening a directory
by toolic (Bishop) on Mar 06, 2015 at 17:08 UTC | |
by The_Last_Monk (Novice) on Mar 06, 2015 at 17:13 UTC | |
|
Re: Dots appearing when opening a directory
by Anonymous Monk on Mar 06, 2015 at 17:08 UTC | |
| |
|
Re: Dots appearing when opening a directory
by karlgoethebier (Abbot) on Mar 06, 2015 at 17:55 UTC | |
|
Re: Dots appearing when opening a directory
by trippledubs (Deacon) on Mar 06, 2015 at 18:11 UTC | |
by marinersk (Priest) on Mar 06, 2015 at 22:04 UTC | |
|
Re: Dots appearing when opening a directory
by Laurent_R (Canon) on Mar 06, 2015 at 19:03 UTC | |
|
Re: Dots appearing when opening a directory
by Anonymous Monk on Mar 06, 2015 at 17:14 UTC |