Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^5: Array of variables

by frozenwithjoy (Priest)
on May 28, 2013 at 21:30 UTC ( #1035737=note: print w/replies, xml ) Need Help??


in reply to Re^4: Array of variables
in thread Array of variables

The difference is that you are actually printing the thing you are incrementing rather than incrementing one item and printing another completely distinct item. What the OP did is more like the final print statement here:
perl -E ' my ( $x, $y, $z ) = ( 1, 2, 3 ); my @a = ( $x, $y, $z ); say join " ", map { $_++, $_ } @a; say "@a"; say "$x $y $z"; ' 1 2 2 3 3 4 2 3 4 1 2 3

Replies are listed 'Best First'.
Re^6: Array of variables
by dbuckhal (Pilgrim) on May 28, 2013 at 21:39 UTC
    Well, let me just
    perl -E ' say "Thanks!" '

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1035737]
help
Chatterbox?
[SuicideJunkie]: Blergh. Trying to work into low level C code, stuff that would have been so easy with a regex.

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (13)
As of 2016-12-07 21:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (131 votes). Check out past polls.