Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Idiomatic optimizations

by particle (Vicar)
on Apr 29, 2002 at 17:10 UTC ( #162868=note: print w/ replies, xml ) Need Help??


in reply to Idiomatic optimizations

when printing, comma (,) is faster than concatenate (.). print $foo, ' -- ', $bar, $/; is faster than print $foo . ' -- ' . $bar . $/;

~Particle *accelerates*


Comment on Re: Idiomatic optimizations
Select or Download Code
Re: Re: Idiomatic optimizations
by blakem (Monsignor) on Apr 30, 2002 at 05:40 UTC
    One caveat though: When printing a list, each element is evaluated in LIST context whereas concatenated expressions are evaluated in SCALAR context....
    % perl -le 'print "Today: ". localtime()' Today: Tue Apr 30 01:35:48 2002 % perl -le 'print "Today: ", localtime()' Today: 5435130310221191

    -Blake

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2015-07-05 13:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (67 votes), past polls