in reply to Re: CPAN Module for mixing Unix/Windows path
in thread CPAN Module for mixing Unix/Windows path
In this case, no, because if I have "control" over the strings, I use a / anyway all the time. Here is an example where it is not sufficient:
I have a directory path with / as separator, and I want to append to this directory a relative path of subdirs. This path I get from %ENV. The user is allowed to use either Windows or Unix style separators. If I want to form a consistent path (say: Unix style), then I need to translate the backslashes in the user-supplied path to forward slashes.
This is only a simple example. Other examples are: Translating a Unix path to Windows (for usage in a generated BAT file) or vice versa (for usage in a generated piece of bash script).
Let me emphasize that all these transformations are easy to do. I just thought that *if* someone has published a module with such features, it would not only be helpful, but would maybe also contain other useful stuff for mixed-OS environment development.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: CPAN Module for mixing Unix/Windows path
by syphilis (Archbishop) on Jun 05, 2008 at 12:58 UTC |