Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re^4: RFC: A Primer on Writing Portable Perl Programs

by Intrepid (Deacon)
on Nov 02, 2006 at 07:33 UTC ( #581836=note: print w/replies, xml ) Need Help??

in reply to Re^3: RFC: A Primer on Writing Portable Perl Programs
in thread RFC: A Primer on Writing Portable Perl Programs

pKai wrote on 1 Nov 2006:
   (yumpy wrote on 1 Nov 2006:)
doubling the number of 'quoting' characters…("x" vs. qq{x})

· In the realm of your discussion it's (\"x\" vs. qq{x}) which makes the score even.

I don't think it would catch on as a routine practice.

· It is routine practise, but that may be only me. For one I don't like "external" characters inside my perl code (the backslash belonging to the cmd.exe, and is not seen by perl), and secondly it's actually easier to parse when read (for my brain at least).

It is not only you, pKai. I also routinely make a practice of using some alternate Perl quoting delimiters, when writing a one-liner for Windows/CMD or one that I think might ever run on Windows/CMD.

In my experience it only takes a little practice to "see" the quoted string standing out clearly when using a q<some-char> construct, just as or nearly as easily as one without practice does with ordinary "s. But then I write a lot of Perl.

Since it is tangential to this reply I won't go deeply into it, but one pet peeve of mine concerns assumptions about what shell a Win32 Perler is using. There are UNIX sh -like shells being used on MS Windows. There's a special environmental variable, PERL5SHELL, addressing that. Yet most all of the core Perl utility code (i.e. for things like ExtUtils) assumes that a command interpreter on Windows has to be the CMD.exe or type. I feel a bit mistreated ;-). The 3 people still using MINT systems get support, but I as part of who knows how many hundreds or thousands using a 3rd-party UNIX-like shell on MS Windows cannot? By what logic exactly? Because there's so few of us? Only in relation to the total user base for MS Windows. So 3 MINT users or 48 FooIX-1.0 users get support, but trying to use MS Windows better gets us punishment? ;-)

You'll find some more MS Windows / Perl portability notes (especially relating to the creation of DOSKEY macros to fill the role that BASH functions do, in the CMD shell), on my home node, yumpy. Down past the "meta" stuff relating to my experience in 6 years here at Perlmonks. Ignore the growling and squeals of moral distress if that's not what you're into. ;-)

    Soren A / somian / perlspinr / Intrepid

Words can be slippery, so consider who speaks as well as what is said; know as much as you can about the total context of the speaker's participation in a forum over time, before deciding that you fully comprehend the intention behind those words. If in doubt, ask for clarification before you 'flame'.
  • Comment on Re^4: RFC: A Primer on Writing Portable Perl Programs

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (10)
As of 2019-11-22 15:23 GMT
Find Nodes?
    Voting Booth?
    Strict and warnings: which comes first?

    Results (113 votes). Check out past polls.