Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://638068]
help
Chatterbox?
[PriNet]: go figure, i just tried that, it retains some of the values (not the key) of the pre-assigned value
[PriNet]: i guess i'll just have to use two seperate hashes, there are two, but one is larger than the other, and when i reference the smaller one, it holds onto the values that were assigned to the larger hash (the keynames change, but unless i reassign a new valu

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (2)
As of 2017-06-28 02:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (619 votes). Check out past polls.