On Wed, Jun 27, 2001 at 11:07:12AM -0400, Kevin Meltzer wrote:
> On Wed, Jun 27, 2001 at 10:55:54AM -0400, Jeff 'japhy' Pinyan ([EMAIL PROTECTED]) 
>spew-ed forth:
> > On Jun 27, Nick Transier said:
> > 
> > The perlop documentation says that ++ is magical for strings, but that --
> > isn't.  The reason is because there's not a clear-cut way of defining it.
> > 
> > What is 'a'--? 
> 
> Is that the reason? I would think --'a' would be z, but that is my own
> internal logic :)

But ++'z' isn't 'a'.

> But, why is --'a' (or any a-zA-Z) -1? Why doesn't, at least, it evaluate
> 'a' to true (1) and --'a' = 0 (or undef, since I don't know why it
> should return a true value)? I guess there must be a reason, but it
> isn't documented from what I can see.

Converting 'a' to a number gives 0.

-- 
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net

Reply via email to