Syntactic Confectionery Delight | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
It's not a bug in Perl, and it's not a bug in File::Spec::Functions: it's documented (and intended) behavior. At the beginning of File::Spec, it looks at the value of $^O to see which operating system it's on, then selects an appropriate subclass. On Windows, that's File::Spec::Win32, and in that module it defines the directory separator. You want it to pick something else. You could add a subclass for UNC so the module handles the root directory and other things correctly, or you can make File::Spec think that it's on another system. I sometimes need to do this to work with paths from other systems without turning them into UNIX paths.
I run this on FreeBSD and get "top\middle\bottom".
-- brian d foy <bdfoy@cpan.org> In reply to Re: UNC vs. standard Perl functions
by brian_d_foy
|
|