Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: OS independent perl script

by sundialsvc4 (Abbot)
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.

Log In?

What's my password?
Create A New User
Domain Nodelet?
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 studying the Monastery: (2)
As of 2023-06-04 21:22 GMT
Find Nodes?
    Voting Booth?
    How often do you go to conferences?

    Results (22 votes). Check out past polls.