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

Re: "write once, run anywhere"

by nimdokk (Vicar)
on Sep 10, 2007 at 13:43 UTC ( [id://638068]=note: print w/replies, xml ) Need Help??


in reply to "write once, run anywhere"

I can say that when trying to make Perl platform independent (at least with what we do), we have to occasionally put in an if/then based on the OS. Most of the time, this is handled behind the scenes either in a module or in standard sections of code that my co-workers do not need to worry about modifying. I find that I need to combine $^O and File::Spec (Unix or Win32) to get what I need (paths will be different for what we do based on the OS in question).

It is my understanding that while the Java code would remain the same regardless of platform, the JVM might have differences in it based on the OS and compilers. If the JVM works the same as the Perl executable, then there might not be much difference (from a scripts perspective between OS platforms). There of course would be differences in the underlying exectuble that is invoked.

Please also bear in mind that I Am Not An Expert and could be completely wrong in all my comments :-).

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (8)
As of 2024-04-18 06:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found