Due to some messed up legacy code,
I have
$path = [OS specific base DIR name][hardcoded Linux file path]
So on Linux, it is something like
$path = /common/path/to/dir/pathtofile/name.extension
but on Windows it becomes this
$path = C:\path\to\dir\pathtofile/name.extension
Some of the code fails on Windows because it is expecting a \
while it gets a /
.
Is there a Perl function that can help me here?
Something like
print "$path\n";
$path = <some function> $path;
print "$path\n";
C:\path\to\dir\pathtofile/name.extension
C:\path\to\dir\pathtofile\name.extension