Re: Running the same perl script on Win32 and Unix
- From: "Paul Lalli" <mritty@xxxxxxxxx>
- Date: 7 Sep 2006 05:14:01 -0700
jeffhua@xxxxxxx wrote:
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 'linux' ? 'Linux' : 'others';
}
Can you please explain in what way that would at all solve the OP's
problem? Can you please also explain why you're using the depreciated
'vars' pragma?
Paul Lalli
.
- References:
- Running the same perl script on Win32 and Unix
- From: Mahdi A Sbeih
- Re: Running the same perl script on Win32 and Unix
- From: jeffhua
- Running the same perl script on Win32 and Unix
- Prev by Date: Re: hash key not found .. WHY NOT?
- Next by Date: Re: Running the same perl script on Win32 and Unix
- Previous by thread: Re: Running the same perl script on Win32 and Unix
- Next by thread: Re: Running the same perl script on Win32 and Unix
- Index(es):
Relevant Pages
|