Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Join with x operator

by johngg (Canon)
on Jul 09, 2014 at 09:13 UTC ( [id://1092869]=note: print w/replies, xml ) Need Help??


in reply to Join with x operator

The x operator can act as a list multiplier as well as a string multiplier. The parentheses around ("hello") make it a list and the x 5 turns the statement into

print join("\n", ("hello", "hello", "hello", "hello", "hello")), "\n\n +";

I hope that makes things clearer.

Cheers,

JohnGG

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2024-03-28 10:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found