Re: use modules OS dependent
- From: "Petr Vileta" <stoupa@xxxxxxxxxxxxx>
- Date: Wed, 16 Apr 2008 00:35:23 +0200
Gunnar Hjalmarsson wrote:
sledz@xxxxxxxxxxxx wrote:I'm writing an perl script which should communicate over a serial
port. The script should be able to run in Linux and Win32
environments. In both environments exist modules to access the serial
port:
Win32::SerialPort (under Windows)
Device::SerialPort (else)
I know it is possible to detect the OS using Config::Config. But it
seems not possible to use different modules depending on this
information like this:
<snip>
if ( $^O eq 'MSWin32' ) {
I prefer if ( $^O =~ /Win32/i ) {
--
Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your
mail from another non-spammer site please.)
Please reply to <petr AT practisoft DOT cz>
.
- References:
- use modules OS dependent
- From: sledz
- Re: use modules OS dependent
- From: Gunnar Hjalmarsson
- use modules OS dependent
- Prev by Date: Re: CGI.PM and hidden()
- Next by Date: ANNOUNCE: Text-CSV_XS 0.42
- Previous by thread: Re: use modules OS dependent
- Next by thread: Re: use modules OS dependent
- Index(es):
Relevant Pages
|
|