Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re: OS independent perl script

by sundialsvc4 (Monsignor)
on Feb 19, 2014 at 14:10 UTC ( #1075460=note: print w/ replies, xml ) Need Help??

in reply to OS independent perl script

It might well be easier to talk about what would not be operating-system independent.   All of the core features of the language are implemented in an OS-independent (or, transparently OS-specific) way.   Many (but not all ...) CPAN packages have OS-independence (and there exists a “CPAN Testing Service = CPANTS” which specifically tests them against a very broad gamut of architectures that a package developer might not have access to.)   There are also packages, such as File::Temp, which are specifically designed to let you write things that otherwise would be OS-dependent, in an OS-independent (more or less ...) way.

Problems will arise in your own applications when you write code “by hand,” e.g. using system() calls directly, and so on.   Or even in more obscure ways, as with case-sensitive vs. case-insensitive filenames.   There is a great deal of information already on the Web in a number of places, not just here.   For example, Google "portable perl code".

Finally, “the operating system type” is just one specific example of “enviornment dependency.”   You wouldn’t believe how many systems simply outgrow a small server-farm comprised of sneezy, wheezy, and doc, (or gandalf, frodo, and bilbo), and those server-names (and lots of other stuff that was hastily built with no regard for the future) are friggin’ everywhere . . .   It is best to be thinking of portability (and expansion) from the earliest possible moment in a project.

Comment on Re: OS independent perl script

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (5)
As of 2014-09-18 23:21 GMT
Find Nodes?
    Voting Booth?

    How do you remember the number of days in each month?

    Results (126 votes), past polls