Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re^3: Assign multiple scalars the same value

by Aristotle (Chancellor)
on Jan 24, 2005 at 22:52 UTC ( #424728=note: print w/replies, xml ) Need Help??

in reply to Re^2: Assign multiple scalars the same value
in thread Assign multiple scalars the same value

Yep, it does. Note the difference between these, though:

$,= " "; $\ = "\n"; print( map { int rand 10 } 0 .. 6 ); print( ( int rand 10 ) x 7 );

The x operator only evaluates the list expression once. So you can't always substitute one for the other.

Makeshifts last the longest.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (11)
As of 2016-10-21 13:49 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (289 votes). Check out past polls.