[Bioperl-l] Errors generated from example code in HOW-TO sect ion
Matthew Betts
Matthew.Betts at ii.uib.no
Fri Aug 1 05:20:14 EDT 2003
Whoops, thanks Simon, so it's just treating 'e-169' as zero... I guess it
almost is, and hopefully nothing like 'e-2' ever appears in blast
output...
Matt
On Fri, 1 Aug 2003, simon andrews (BI) wrote:
>
>
> > > Argument "e-171" isn't numeric in numeric lt (<) at
> > > blasttoimg.pl line 49,
>
> > From: Matthew Betts [mailto:Matthew.Betts at ii.uib.no]
> >
> > I recently ran up against the same warning, but was happy to
> > see that perl did the comparison correctly anyway
>
> Oh but it didn't! Try this, then change $num to be 1e-169. Perl guesses, and gets it wrong.
>
> #!/usr/bin/perl -w
> use strict;
>
> my $num = 'e-169';
>
> $num += 0;
>
> print "Number is $num\n";
>
> if ($num == 1e-169) {
> print "OK they match\n";
> }
>
> else {
> print "Oops, no match\n";
> }
>
--
Matthew Betts, mailto:matthew.betts at ii.uib.no
Phone: (+47) 55 58 40 22
CBU, BCCS, UNIFOB / Universitetet i Bergen
Thormohlensgt. 55, N-5020 Bergen, Norway
More information about the Bioperl-l
mailing list