Re: Are there (non-obvious) differences in string quoting methods?

2016-04-06 Thread Uri Guttman
On 04/07/2016 12:28 AM, Kent Fredric wrote: On 7 April 2016 at 07:20, Jonathon Fernyhough wrote: qq{} obviously wins when there would otherwise be a lot of escaping, but are there any downsides of using this method more generally (other than double-quotes being two characters shorter)? For exam

Re: Are there (non-obvious) differences in string quoting methods?

2016-04-06 Thread Kent Fredric
On 7 April 2016 at 07:20, Jonathon Fernyhough wrote: > > qq{} obviously wins when there would otherwise be a lot of escaping, but > are there any downsides of using this method more generally (other than > double-quotes being two characters shorter)? For example, is it "faster" > for Perl to parse

Re: Are there (non-obvious) differences in string quoting methods?

2016-04-06 Thread Paul Johnson
On Wed, Apr 06, 2016 at 08:20:24PM +0100, Jonathon Fernyhough wrote: > Hi, > > I'm working my way through Learning Perl (6th) and Modern Perl (4th) and > was wondering whether there are any (non-obvious) drawbacks to the > different string quoting methods. > > First up, double-quoted strings. The

Re: Are there (non-obvious) differences in string quoting methods?

2016-04-06 Thread Shawn H Corey
On Wed, 6 Apr 2016 15:29:26 -0400 Uri Guttman wrote: > my rule is for the reader and not the computer. i try to use '' when > i know there is no interpolation and "" when there is. i am telling > the reader to either not look or to look inside the string. PBP recommends that yo use q{} for singl

Re: Are there (non-obvious) differences in string quoting methods?

2016-04-06 Thread Uri Guttman
On 04/06/2016 03:20 PM, Jonathon Fernyhough wrote: Hi, I'm working my way through Learning Perl (6th) and Modern Perl (4th) and was wondering whether there are any (non-obvious) drawbacks to the different string quoting methods. First up, double-quoted strings. The "usual method" of double-quot

Are there (non-obvious) differences in string quoting methods?

2016-04-06 Thread Jonathon Fernyhough
Hi, I'm working my way through Learning Perl (6th) and Modern Perl (4th) and was wondering whether there are any (non-obvious) drawbacks to the different string quoting methods. First up, double-quoted strings. The "usual method" of double-quoting has an alternative of qq{For a string with $varia