markwild has asked for the wisdom of the Perl Monks concerning the following question:
And the output I get is:$thispath = 'd:\my documents\my other stuff\*.*'; print "thispath is [$thispath]\n"; @thisdir = glob($thispath); foreach $thisfile (@thisdir) { print " Found [$thisfile]\n"; }
The actual directory has this:thispath is [d:\my documents\my other stuff\*.*] Found [d:./my] Found [docsmy]
However, if I replace the full path with ".\*.*", I get this:12/11/2000 07:49p <DIR> . 12/11/2000 07:49p <DIR> .. 12/11/2000 07:42p 480 dir.pl 12/11/2000 07:52p 185 dir2.pl 12/11/2000 07:53p 0 out.txt 12/11/2000 11:00a 1,125 populate.pl
I can't seem to find anything on CPAN for this, though I know there must be something somewhere. FYI: I've also tried using opendir, as suggested in another article on this site. Is this a problem with Globbing, or with how the file names are stored in the list?thispath is [.\*.*] Found [.\dir.pl] Found [.\dir2.pl] Found [.\out.txt] Found [.\populate.pl]
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Long Directory Names
by clemburg (Curate) on Dec 12, 2000 at 15:48 UTC | |
|
Re: Long Directory Names
by myocom (Deacon) on Dec 12, 2000 at 09:35 UTC | |
|
Re: Long Directory Names
by zzspectrez (Hermit) on Dec 12, 2000 at 12:20 UTC | |
|
Re: Long Directory Names
by repson (Chaplain) on Dec 12, 2000 at 12:25 UTC |