works for me.

$a = "A";
$a++;
print "$a\n"; # prints B


what version are you using? ++ is magical on letters in ver 5.500?+ I think.
Just remember that -- is not magical on letters, you will always get -1 from
that.

> -----Original Message-----
> From: Michael Stearman [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 01, 2002 3:51 PM
> To: [EMAIL PROTECTED]
> Subject: Increment a Variable
> 
> 
> Hi,
> 
> I was wondering if anyone knew how to increment a variable 
> when the variable 
> is a letter.  For example
> 
> $x="A";
> $x++;
> 
> doesn't work.  I'm trying to get $x="B";
> 
> Thanks,
> Mike.
> 
> 
> 
> _________________________________________________________________
> Get your FREE download of MSN Explorer at 
> http://explorer.msn.com/intl.asp.
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

----------------------------------------------------------------------------
--------------------
The views and opinions expressed in this email message are the sender's
own, and do not necessarily represent the views and opinions of Summit
Systems Inc.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to