in reply to Compatibility on Win32 and UNIX

You could check the  $^O variable and switch the path format depending on the result.

$^O eq "hpux" ? $path='/path/thisway':$path='\path\thisway';

Replies are listed 'Best First'.
Re: Re: Compatibility on Win32 and UNIX
by IlyaM (Parson) on May 10, 2002 at 16:42 UTC
    Don't do it. It is ugly. Just use File::Spec. Let perl hackers who maintain this module worry which slash to use on which platform.
    use File::Spec; $path = File::Spec->catfile('path', 'thisway');

    Ilya Martynov (

      Thanks and appreciations go to all of you. Have a good weekend.