Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

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.


Comment on Re: OS independent perl script

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2014-12-21 12:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (105 votes), past polls