!0

Michael Lush mjlush at ebi.ac.uk
Thu Feb 12 15:18:56 GMT 2009


On Thu, 12 Feb 2009, Jonathan Stowe wrote:
> 2009/2/12 Dirk Koopman <djk at tobit.co.uk>:
>> Just been studying a CPAN module and I see a load of references to !0. Er,
>> what is that? Googling most unhelpful.
>>
> It's "Genius" for '1' :-) Please to be clubbing the perpatrator to
> death with a copy of their own wit and eurdition.

It's "Genius" for 'anything but 0', I suppose it could be used to deal 
with the 'zero but true' results in DBI.  (ie $rows = $dbh->do("SELECT * 
FROM foo") returns the number of matches or 0E0 if no rows match.

Is there a better idiom for:-

$rows = $dbh->do("SELECT *
                     FROM foo
                    WHERE baz >= 42")
if ($rows != 0) {
     #do stuff
}

--
Michael
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Michael John Lush PhD			Tel:44-1223 492626
Bioinformatician 
HUGO Gene Nomenclature Committee	Email: hgnc at genenames.org
European Bioinformatics Institute
Hinxton, Cambridge
URL: http://www.genenames.org
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


More information about the london.pm mailing list