I am using Tk for an application on Win32 and wanted to use the most windowish looking chooseDirectory dialog to select a directory. This returns a directory of the sort:
In a next step I need to get all xml files in that directory. Which is the point where I struggle.C:/Documents and Settings/UserX/Desktop/WORK/data/var - 21/dat
Globbing for these values returns an arrat that is split at the spaces and terminates before the -:
@files = glob( $path . "/*.xml ); print join ( "\n", @files ); <code> This returns: <code> C:/Documents and Settings/UserX/Desktop/WORK/data/var
I have also tried to alter the path to a Dos standard.
And then globbed without results.$path =~ s/\//\\\\/g; $path =~ s/\ /\\\ /g;
And I also tried to use File::DosGlob.
Both of the last efforts did return an empty array from the glob function. Does anyone know what the bast way to tackle this problem is?
In reply to Tk::chooseDirectory and glob problem by PerlingTheUK
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |