smark has asked for the wisdom of the Perl Monks concerning the following question:
It should print 'aa', correct? Or maybe 'ab' if the ++ is processed early by perl? It prints 'ba'...#!/usr/bin/perl my @m = ('a','b'); my $i = 0; print @m[$i,$i++];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Array slice out of order
by Roy Johnson (Monsignor) on Feb 03, 2005 at 18:42 UTC | |
|
Re: Array slice out of order
by Tanktalus (Canon) on Feb 03, 2005 at 18:30 UTC | |
by dragonchild (Archbishop) on Feb 03, 2005 at 18:50 UTC | |
by halley (Prior) on Feb 03, 2005 at 18:33 UTC | |
by cog (Parson) on Feb 03, 2005 at 18:54 UTC | |
|
Re: Array slice out of order
by sh1tn (Priest) on Feb 03, 2005 at 19:00 UTC | |
|
Re: Array slice out of order
by TomDLux (Vicar) on Feb 04, 2005 at 18:06 UTC |