in reply to Platform independant directory separator

$^O tells you what OS is running. You can use / or \\ accordingly then. In most cases, the / version works for both OS's. However in certain modules like Win32::OLE the Windows style \\ must be used.

Checking $^O is always safe though.

Grygonos

Replies are listed 'Best First'.
Re: Re: Platform independant directory separator
by tinita (Parson) on Mar 01, 2004 at 12:30 UTC
    > You can use / or \\ accordingly then.
    but there are more than two operating systems...
      Yes, but this will work for 99% of most applications. Treating Unix/Linux/MacOS as "not Windows" covers nearly everything for x86, IA64, IA32e, and Mac PPC hardware -- maybe more. It's one thing to say "platform independance" but it usually means "Windows and some UNIX-like systems and maybe Netware and OS/2". Depends on what you want to run on.
        What OS has to do with CPU architecture?