http://www.perlmonks.org?node_id=581656


in reply to RFC: A Primer on Writing Portable Perl Programs

Perl portability is a bigger subject than your meditation gives credit for. Although to my mind you have just scratched the surface, I fully approve of your meditation, and any call to arms on portability.

I have spoken about this subject at several YAPC conferences, workshops and perlmonger tech talks, see http://www.ivorw.com/talks/perlport.ppt. You're welcome to use any material from these slides, suitably acknowledged. You can quote the URL as I have no plans to move it. Also, if you have any feedback or corrections, please let me know.

Some specific comments

Section 1.2 is not correct - it's not just a case of the direction of your slashes, but whether your filename is using native syntax or POSIX syntax. Have a look at VMS filenames for a bizarre native syntax.

When it comes to running perl scripts and one-liners on Windows, pl2bat is worth a mention, as is PAR. Also, on Windows I nearly always turn off the file association between .pl and perl, as usually when browsing directories and websites, I don't want to run a .pl, I want to look at it.

--

Oh Lord, won’t you burn me a Knoppix CD ?
My friends all rate Windows, I must disagree.
Your powers of persuasion will set them all free,
So oh Lord, won’t you burn me a Knoppix CD ?
(Missquoting Janis Joplin)

  • Comment on Re: RFC: A Primer on Writing Portable Perl Programs

Replies are listed 'Best First'.
Re^2: RFC: A Primer on Writing Portable Perl Programs
by yumpy (Sexton) on Nov 01, 2006 at 18:25 UTC
    Good comments, and lots of good information in the PowerPoint presentation! Thanks for the input.
    * Tim Maher, CEO, Consultix | yumpy@consultix-inc.com *
Re^2: RFC: A Primer on Writing Portable Perl Programs
by pKai (Priest) on Nov 02, 2006 at 00:07 UTC
    on Windows I nearly always turn off the file association between .pl and perl
    For a different approach (motivated by spending more time on the cmd prompt than in explorer windows) I extend the PATHEXT (system) environment variable with a ";.PL" to be able to call my Perl scripts by name without extension.