I came up with another one.  This also works for values of true other
than 1.

if ($a=~tr/.[^0]+/0/c) { do_something(); }



On Wed, 22 May 2002, Josh Goldberg wrote:

> how about 
> 
> do_something($a=0) if $a;
> 
> 
> On Wed, 22 May 2002, Scott Wiersdorf wrote:
> 
> > My shortest try is this (10 characters w/o whitespace):
> > 
> >     if( $a%2 .. $a-- ) {
> >         do_something();
> >         ...
> >     }
> > 
> 
> 


Reply via email to