[Bioperl-l] Errors generated from example code in HOW-TO sect ion

simon andrews (BI) simon.andrews at bbsrc.ac.uk
Fri Aug 1 04:54:35 EDT 2003



> > 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";
}


More information about the Bioperl-l mailing list