Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: "write once, run anywhere"

by nimdokk (Vicar)
on Sep 10, 2007 at 13:43 UTC ( #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?

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2021-03-04 19:04 GMT
Find Nodes?
    Voting Booth?
    My favorite kind of desktop background is:

    Results (107 votes). Check out past polls.