Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Re: cross platform scripts

by John M. Dlugosz (Monsignor)
on Jan 21, 2003 at 22:55 UTC ( [id://228878]=note: print w/replies, xml ) Need Help??


in reply to Re: cross platform scripts
in thread cross platform scripts

I wonder if the argument to use can simply be conditional, without needing a helper module?

use ($^O eq 'MSWIn32' ? 'MyAppWin32' : 'MyAppUnix');
I think that should work in principle, since the comparison will be done before the use. It's just a matter of checking the docs to see what the differences are between barewords and normal strings in the use/require magic.

—John

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://228878]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-04-25 15:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found