Re: #ifdef-like way to make code work on both Windows/Linux?

2007-10-20 Thread johan556
On 10/18/07, Suresh Govindachar [EMAIL PROTECTED] wrote: Johan Holmberg asked: 1) use Win32API::File qw( :ALL ) 2) use of constans like GENERIC_WRITE and FILE_SHARE_DELETE. 3) calls to functions like Win32::File::CreateFile Why are you using those windows specific modules?

Re: #ifdef-like way to make code work on both Windows/Linux?

2007-10-20 Thread johan556
On 10/18/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I have a Perl application that should work on both Windows and Linux. On Windows I use some of the Windows-specific modules, e.g. Win32API::File. So my code have things like: 1) use Win32API::File qw( :ALL ) 2) use of constans like

Re: #ifdef-like way to make code work on both Windows/Linux?

2007-10-19 Thread Bbirthisel
Hi Johan, In a message dated 10/18/2007 11:34:29 AM Eastern Daylight Time, [EMAIL PROTECTED] writes: I have a Perl application that should work on both Windows and Linux. On Windows I use some of the Windows-specific modules, e.g. Win32API::File. So my code have things like: 1) use

RE: #ifdef-like way to make code work on both Windows/Linux?

2007-10-18 Thread Suresh Govindachar
Johan Holmberg asked: I have a Perl application that should work on both Windows and Linux. On Windows I use some of the Windows-specific modules, e.g. Win32API::File. So my code have things like: 1) use Win32API::File qw( :ALL ) 2) use of constans like GENERIC_WRITE and

Re: #ifdef-like way to make code work on both Windows/Linux?

2007-10-18 Thread Veli-Pekka Tätilä
[EMAIL PROTECTED] wrote: I have a Perl application that should work on both Windows and Linux. On Windows I use some of the Windows-specific modules, e.g. Win32API::File. So my code have things like: Check perldoc perlvar namely the $^O variable that holds your OS name e.g: C:\perl -e print