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\TempNew Folder';
print "$pathn";
(my $gpath = $path) =~ s|\|/|g;
print "$gpathn";
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
ActivePerl listserv.ActiveState.com
To unsubscribe: http:/
/listserv.ActiveState.com/mailman/mysubs
|