in reply to how to evaluate exponential notations and floating points
#!/usr/bin/perl use strict; use warnings; while(my $evalue = <DATA>){ chomp $evalue; if($evalue < 0.001){ print $evalue, "\n"; } } __DATA__ 1e-005 2e-090 0.00 0.67 1.0 4e-065
The main changes are the file handles. Note that your chomp was not given a variable, and hence was operating on $_ instead of $evalue.
|
|---|