Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug (?) in module File::Find #929

Closed
p5pRT opened this issue Dec 9, 1999 · 4 comments
Closed

Bug (?) in module File::Find #929

p5pRT opened this issue Dec 9, 1999 · 4 comments

Comments

@p5pRT
Copy link

p5pRT commented Dec 9, 1999

Migrated from rt.perl.org#1872 (status was 'resolved')

Searchable as RT1872$

@p5pRT
Copy link
Author

p5pRT commented Dec 9, 1999

From Peter.Schuringa@NL2.vdogrp.de

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

@p5pRT
Copy link
Author

p5pRT commented Dec 9, 1999

From @tamias

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

@p5pRT
Copy link
Author

p5pRT commented Dec 10, 1999

From [Unknown Contact. See original ticket]

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...

@p5pRT
Copy link
Author

p5pRT commented Dec 12, 1999

From [Unknown Contact. See original ticket]

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant