[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [Fun With Perl] Does this count as a one-liner?



On Wed, Jun 16, 1999 at 08:25:24AM -0400, Mike Giroux wrote:
> > > Also, do I really save any CPU time with the <<'' rather than <<"" in
> > > the first part of this last example?
>
> IIRC, I read somewhere that at "compilation" time qq strings that
> don't need interpolation are compiled to an equivalent token type to
> q (') strings.  
>
> If that's the case, then you won't have any runtime penalty, and the
> startup penalty is not going to be noticeable, since parsing an
> empty string is hardly challenging :)

Ah. Clever.

Of course, the point that if I'm that concerned about performance I',
using the wrong language is also very well taken.

In any case, I am pretty rigorous about using '' in uninterpolated
strings so that it's _obvious_ that the string does not contain
any $vars.

Tom

-- 
--    Tom Rathborne    tomr@aceldama.com
--                     http://www.aceldama.com/~tomr/
--    "I seem to be having tremendous difficulty with my life-style."

==== Want to unsubscribe from this list? (Don't you love us anymore?)
==== Well, if you insist... Send mail with body "unsubscribe" to
==== fwp-request@technofile.org