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

Re: Scalar joining, concatenation, involving varying text

by GrandFather (Saint)
on Jun 27, 2005 at 16:40 UTC ( [id://470382]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Scalar joining, concatenation, involving varying text

Modifiers may well be what you want:

$combined .= "a=$a " if $a; $combined .= "b=$b " if $b; $combined .= "c=$c " if $c;

Concise and clear.


Perl is Huffman encoded by design.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://470382]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.