in reply to Re: Platform independant directory separator
in thread Platform independant directory separator
my $platform_independent_path = canonpath "../data/somepath/somedata.txt"; my $directory_separator = canonpath "/";
Erm. No.
All canonpath does is clear up a directory in to a canonical for for a specific platform - it's not platform independent in any way.
For example running your code on a Mac OS 9 box would set $directory_separator to "/" when it would more accurately be ":".
As rinceWind points out the idea of a single separator isn't valid on some platforms in any case.
|
|---|