On Thu, Nov 01, 2001 at 04:06:01PM -0500, Brett W. McCoy wrote:
> "The autodecrement operator, however, is not magical, and we have no plans
> to make it so". Of course, no reason is given as to why... :-)
I believe the biggest reason is that the correct behaviour in edge cases
can't be decided.
On Thu, 1 Nov 2001, Gross, Stephan wrote:
> The following script:
> $a ="X";
> $a++;
> print $a;
> $a--;
> print $a;
>
> prints
> Y
> -1
>
> Why does the autoincrement work in the + direction but not in the -? How do
> I get the letter before "Y" back? Is this a Perl bug?
Not exactly. From th
: 'Beginner Perl'
Subject: Increment & Decrement Strangeness
The following script:
$a ="X";
$a++;
print $a;
$a--;
print $a;
prints
Y
-1
Why does the autoincrement work in the + direction but not in the -? How do
I get the letter before "
The following script:
$a ="X";
$a++;
print $a;
$a--;
print $a;
prints
Y
-1
Why does the autoincrement work in the + direction but not in the -? How do
I get the letter before "Y" back? Is this a Perl bug?
___
Stephan Gross Loral Skyn