Closed p5pRT closed 20 years ago
There seems to be a glitch in the module "File::Find". Whenever this module constructs a file name (which can be accessed via File::Find::name) it uses a forward slash ("/") even if the perl-script is running on a WinNT box. This is very annoying as I am writing perl-code that must run properly on both WinNT as UNIX boxes. Modifying the line below will solve this problem: $name = "$dir/$_";
With kind regards\, Peter Schuringa VDO-CC\, Eindhoven\, The Netherlands
On Thu\, Dec 09\, 1999 at 05:41:29PM +0100\, Schuringa\, Peter wrote:
Ls\,
There seems to be a glitch in the module "File::Find". Whenever this module constructs a file name (which can be accessed via File::Find::name) it uses a forward slash ("/") even if the perl-script is running on a WinNT box. This is very annoying as I am writing perl-code that must run properly on both WinNT as UNIX boxes. Modifying the line below will solve this problem: $name = "$dir/$_";
WinNT should not have any problem using filenames containing forward slashes as directory separators.
Have you actually encountered any problems using the module on WinNT?
Ronald
From: Ronald J Kimball [mailto:rjk@linguist.dartmouth.edu]
WinNT should not have any problem using filenames containing forward slashes as directory separators.
Have you actually encountered any problems using the module on WinNT?
It's not me with the problem\, but system("dir $file") is a trivial example of something that requires backslashes. Basically\, system calls work OK\, but the shell (as used by system\, qx\, pipes\, exec) doesn't like forward slashes.
But use of the shell isn't portable\, so that may not be relevant to the original poster.
Logging filenames to a report is another area where forward slashes "don't work" - in the sense that reports should use the system's "canonical" filename format. I'd hate to try to explain to a customer that slashes are OK - especially if slashes and backslashes are mixed...
Ronald J Kimball \rjk@​linguist\.dartmouth\.edu writes:
On Thu\, Dec 09\, 1999 at 05:41:29PM +0100\, Schuringa\, Peter wrote:
Ls\,
There seems to be a glitch in the module "File::Find". Whenever this module constructs a file name (which can be accessed via File::Find::name) it uses a forward slash ("/") even if the perl-script is running on a WinNT box. This is very annoying as I am writing perl-code that must run properly on both WinNT as UNIX boxes. Modifying the line below will solve this problem: $name = "$dir/$_";
WinNT should not have any problem using filenames containing forward slashes as directory separators.
The OS calls don't mind. But passing them as strings via cmd.exe (e.g. via system()) does not work.
Have you actually encountered any problems using the module on WinNT?
Ronald -- Nick Ing-Simmons
Migrated from rt.perl.org#1872 (status was 'resolved')
Searchable as RT1872$