in reply to win32/unix compatible code question
If you need to change the path separator based on underlying OS, File::Spec's catfile and catdir should help. It's a standard module, and its purpose is to "portably perform operations on file names".
An example:
#!perl use File::Spec::Functions; print catfile( qw/dir subdir file/ ); __END__ On my FreeBSD box, the result is "dir/subdir/file" On my Win2K box , the result is "dir\subdir\file"
|
---|