From: Marc Perry <marcperrys...@gmail.com>
> I noticed that most beginner texts will introduce and use print like this:
> 
> print $moose, $squirrel, $boris, "\n";
> 
> However, when I review code from CPAN, I often (typically) see:
> 
> print $bullwinkle . $rocky . $natasha . "\n";
> 
> As I recall, print is a list operator (and therefore the comma syntax is
> used to separate items in a list), but is catenation somehow faster/more
> memory efficient?

Compared with the price of the IO operation the concatenation versus 
passing several values is irrelevant. I do not dare to guess which 
one is more efficient in what circumstances, but I don't think the 
difference matters.

Jenda
===== je...@krynicky.cz === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
        -- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to