in reply to Re: Array of variables
in thread Array of variables
Ok, I'm confused....
...or more (which I believe) is more similar to the OP's example:perl -le '($x, $y, $z) = (1, 2, 3); @a = ($x, $y, $z); print join ( " +", map { $_++, $_ } @a )' __output__ 1 2 2 3 3 4
Am I not breaking it correctly? :)perl -le 'my @a; my ($x, $y, $z) = (1, 2, 3); @a = ($x, $y, $z); print + $a[1]; $a[1]++, print $a[1];' __output__ 2 3
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Array of variables
by frozenwithjoy (Priest) on May 28, 2013 at 20:54 UTC | |
by dbuckhal (Chaplain) on May 28, 2013 at 21:06 UTC | |
by frozenwithjoy (Priest) on May 28, 2013 at 21:30 UTC | |
by dbuckhal (Chaplain) on May 28, 2013 at 21:39 UTC |
In Section
Seekers of Perl Wisdom