On Mon, Mar 17, 2014 at 02:43:56PM -0700, bulk88 via RT wrote: > Everything is fine in that except 1 thing. > > Why replace the single quotes with double quotes for the sake of using > double quotes? I've always assume double quotes take longer for the > compiler to parse than single quotes, and using double quotes without > knowing why leads to a larger change of unintended code > execution/interpolation. The difference in parsing time between single and double quotes strings is infinitesimal and should not be a consideration in a small test file, especially one that does a lot of forking and sleeping. So I went for readability. IMO, "that's all" is much easier for the brain to parse than q|that's all| since the '|' character in perl isn't normally associated with string delimiting. The choice of single verses double-quoted is debatable. It can cause errors either way. For example someone later modifying your version might accidentally add: q|that's all, $person| while someone modifying my code might do "that's all you get for $100" In either case, if the programmer doesn't check the quotedness of string before modifying it, they get everything they deserve. -- A power surge on the Bridge is rapidly and correctly diagnosed as a faulty capacitor by the highly-trained and competent engineering staff. -- Things That Never Happen in "Star Trek" #9Thread Previous | Thread Next