Roode, Eric wrote: > > Yes, that's true. Although a little experimentation shows that > the spaces have to be prefixed with backslashes for glob() to work > properly. > > So it looks like I'll have to take the user's input and > tr/\\/\//; > s/ /\\ /g; > > Sound about right?
Worked for me without escaping the spaces: use strict; use warnings; my $path = '\\\\Dollar\\C\\Temp\New Folder'; print "$path\n"; (my $gpath = $path) =~ s|\\|/|g; print "$gpath\n"; print "$_\n" foreach glob "$gpath/*"; __END__ //Dollar/C/Temp/New Folder/a b c.d //Dollar/C/Temp/New Folder/foo //Dollar/C/Temp/New Folder/fubar.txt _______________________________________________ ActivePerl mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
