in reply to Re^2: declare and init a scalar
in thread declare and init a scalar

I've got into the habit of using q{ ... } and qq{ ... } because it I work in both Unix/Linux and MS Windows environments. They mean I don't have to think about the quoting conventions of the o/s when writing one-liners,

That is the most (only) cogent argument I seen for this practice.

However, given that you have to think about whether to use -E' ... ' or -E" ... " in the first place, within that, choosing to use q[ ... ] or qq[ ... ] when appropriate doesn't seem so hard.

And limiting that use to just one-liners, less so.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". I'm with torvalds on this
In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked

Replies are listed 'Best First'.
Re^4: declare and init a scalar
by Anonymous Monk on Jan 23, 2015 at 02:00 UTC
    but then the noobers who get the oneliners don't understand '' "" of their own shell ... easiest just to change one pair of quotes rather than many
Re^4: declare and init a scalar
by soonix (Chancellor) on Jan 23, 2015 at 11:44 UTC
    Too bad that perl -Eq{...} doesn't work - though probably for different reasons on different OSes :-)
      Too bad that perl -Eq{...} doesn't work - though probably for different reasons on different OSes :-)

      Nah! Perl has no equal on any OS :)


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority". I'm with torvalds on this
      In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked