Perl portable path separator
November 22, 2010 19:47:18 Last update: November 22, 2010 19:47:43
Use the File::Spec module for portable file path separator (e.g., '/' for Unix/Linux, '\' for Windows):
Or
# returns 'a/b/c' on Unix; 'a\b\c' on Windows use File::Spec; $x = File::Spec->catfile('a', 'b', 'c');
Or
# returns 'a/b/c' on Unix; 'a\b\c' on Windows use File::Spec::Functions; $x = catfile('a', 'b', 'c');