coolmichael has asked for the wisdom of the Perl Monks concerning the following question:
#$a=(--(($a++)++)); #ugly, and doesn't compile sub mag1{ #works, but still not pretty. $b=shift; ++$b; } $a = "07"; $a++; print "should be 08: $a\n"; $a = $a + 1; print "should be 09: $a\n"; #####OUTPUT should be 08: 08 should be 09: 9
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Squeezing $a+1 to be magical like $a++
by jeroenes (Priest) on Oct 10, 2001 at 14:16 UTC | |
|
Re: Squeezing $a+1 to be magical like $a++
by Zaxo (Archbishop) on Oct 10, 2001 at 10:20 UTC | |
by pixel (Scribe) on Oct 10, 2001 at 13:16 UTC | |
by blakem (Monsignor) on Oct 10, 2001 at 13:45 UTC | |
by davorg (Chancellor) on Oct 10, 2001 at 14:23 UTC | |
|
Re: Squeezing $a+1 to be magical like $a++
by blakem (Monsignor) on Oct 10, 2001 at 10:46 UTC | |
|
Re: Squeezing $a+1 to be magical like $a++
by htoug (Deacon) on Oct 10, 2001 at 12:40 UTC | |
|
Re: Squeezing $a+1 to be magical like $a++
by jryan (Vicar) on Oct 10, 2001 at 10:53 UTC |