On Mon, Feb 03, 2003 at 06:25:09AM -0800, Austin Hastings wrote:
> The only time this doesn't change type (arguably a bad thing in its own
> right) is when you're doing boolean ops. And for those, there exist
> boolean operators.

Changing type is a very Perlish thing to do.

> > How 'bout a shortcut for that, something like this:
> > 
> >     $var ?= 1 : 0;
> 
> Isn't this the same as C<$var &&= 1;> ?

No

for example, "" maps to 0.

A better example:

$var ??= 'succeeded' :: 'failed';

-- 
"You're so sadly neglected, and often ignored.
A poor second to Belgium, When going abroad."
Monty Python - "Finland"

Reply via email to