on Mon, 19 Aug 2002 10:09:16 GMT, [EMAIL PROTECTED] (Jochen Berger) wrote:
> I've got a problem with a Perl Script I wrote to find files > matching a special pattern. It worked fine until I commented it. > From that time on the program has got problems with that WIN32 > feature called "You want spaces in your file name? Then do it!". > If the program finds a directory containing a space, it returns > the path without spaces and backslashes. This doesn't make sense > to me (especially because it worked before). The following code works for me (note the forward slash): #! perl -w use strict; my $dir = 'c:/My Documents/'; my $filter = '*.doc'; my $path = qq{"$dir$filter"}; my @files = glob($path); > BTW: This program was supposed to work either under Unix AND > Windows. Is there a chance to get the path separator for the > current operating system like in Java (File.pathSeparator)? See perldoc File::Spec for portable operations on filenames. -- felix -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]