Beefy Boxes and Bandwidth Generously Provided by pair Networks kudra
Don't ask to ask, just ask
 
PerlMonks  

Re^3: Strictly nested sub warnings

by GrandFather (Cardinal)
on Oct 06, 2010 at 04:42 UTC ( #863721=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Strictly nested sub warnings
in thread Strictly nested sub warnings

It's fairly minor, but using concatenation when you could use interpolation instead tends to obscure the result you are aiming for. Compare the following two print statements:

use strict; use warnings; my $tsuJ = 'tsuJ'; my $rehtonA = 'rehtonA'; my $lreP = 'lreP'; my $rekcaH = "\nrekcaH"; print join ' ', map {scalar reverse} split / /, $tsuJ . ' ' . $rehtonA + . ' ' . $lreP . ' ' . $rekcaH; print join ' ', map {scalar reverse} split / /, "$tsuJ $rehtonA $lreP +$rekcaH";
True laziness is hard work


Comment on Re^3: Strictly nested sub warnings
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2014-04-17 22:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (458 votes), past polls