Although you need to actively think Perl,
!!$a
is a lot shorter than
defined $a && ($a ne "" || $a <>0 );
Comments?
First and foremost, the above is a syntax error. But let's suppose you
really meant "$a != 0" up there.
If $a is 0, then !!$a is '', but defined $a && ($a ne "" || $a != 0) is 1.
So !!$a may be shorter, but it is not equivalent.
--
Eric
`$=`;$_=\%!;($_)=/(.)/;$==++$|;($.,$/,$,,$\,$",$;,$^,$#,$~,$*,$:,@%)=(
$!=~/(.)(.).(.)(.)(.)(.)..(.)(.)(.)..(.)......(.)/,$"),$=++;$.++;$.++;
$_++;$_++;($_,$\,$,)=($~.$"."$;$/$%[$?]$_$\$,$:$%[$?]",$"&$~,$#,);$,++
;$,++;$^|=$";`$_$\$,$/$:$;$~$*$%[$?]$.$~$*${#}$%[$?]$;$\$"$^$~$*.>&$=`