in reply to CPAN Module for mixing Unix/Windows path
Your makepath sounds like File::Spec's catdir. catdirwill return a consistent result, but the opposite of the one you asked for.
I suppose you could use filter the output of catdir as follows
use File::Spec::Functions qw( catdir ); sub lean_forw { my $s = @_ ? $_[0] : $_; $s =~ tr!\\!/!; return $s; } lean_forw(catdir('/home/foo/abc', 'bar\baz'))
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: CPAN Module for mixing Unix/Windows path
by mandarin (Hermit) on Jun 05, 2008 at 12:27 UTC | |
by ikegami (Patriarch) on Jun 05, 2008 at 14:09 UTC | |
by mandarin (Hermit) on Jun 05, 2008 at 14:39 UTC | |
by ikegami (Patriarch) on Jun 05, 2008 at 14:50 UTC |