Re: Running the same perl script on Win32 and Unix

2006-09-07 Thread Mahdi A Sbeih
Thanks Rob, this worked just perfect. Yes, you picked the right first name, thanks allot. -Mahdi. Rob Dixon wrote: Mahdi A Sbeih wrote: > Hi there, > > I have a perl script that will run on both Unix and Windows platforms, > the only problem I am having is below: > > use Win32::Process; > >

Re: Running the same perl script on Win32 and Unix

2006-09-07 Thread Rob Dixon
Mahdi A Sbeih wrote: > Hi there, > > I have a perl script that will run on both Unix and Windows platforms, > the only problem I am having is below: > > use Win32::Process; > > I have to use the above only for windows since later in my script: > if ($platform eq 'UNIX') { >system("$Cmd

Re: Running the same perl script on Win32 and Unix

2006-09-07 Thread jeffhua
  I don't want to maintain two scripts, and it seems I cann't do something like this on the top of the script:  if ($platform eq 'WINDOWS') {    use Win32::Process;  }    Anyone can help?  Hi,it seems that you want to put them in BEGIN block.ie, BEGIN { use vars qw/$OS/; $OS = $^O eq '