Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^4: Scalar assignment with loop iterator considered bad?

by Xaositect (Friar)
on Jul 22, 2005 at 20:12 UTC ( #477339=note: print w/replies, xml ) Need Help??


in reply to Re^3: Scalar assignment with loop iterator considered bad?
in thread Scalar assignment with loop iterator considered bad?

Of course, we still have an extra comma-space if @columns is empty...

Arg. Sorry, couldn't resist. :)


Xaositect - Whitepages.com

Replies are listed 'Best First'.
Re^5: Scalar assignment with loop iterator considered bad?
by BrowserUk (Pope) on Jul 22, 2005 at 20:23 UTC

    Which is why I'd probably defer adding the trailing comma until I knew I was actually going to add something else:

    $var .= join ', ', @stuff; $var .= ', ' . 'more stuff' if $moreStuffNeeded;

    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
    "Science is about questioning the status quo. Questioning authority".
    The "good enough" maybe good enough for the now, and perfection maybe unobtainable, but that should not preclude us from striving for perfection, when time, circumstance or desire allow.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (3)
As of 2020-10-29 05:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (269 votes). Check out past polls.

    Notices?