Hello,
i have a problem with perl. Se below.
my $v =0;
........................................
if ($_ =~ m/value = (\S+)/) {
$v = $1; // $1 take the right value eg. "e-33"
if ( $v < 1) { # here the error
......................
}
//the file is:
..............
otherString value = e-30 otherString
otherString value = 4e-30 otherString
otherString value = 1e-20 otherString
.........................
my $v =0;
........................................
if ($_ =~ m/value = (\S+)/) {
$v = $1; // $1 take the right value eg. "e-33"
if ( $v < 1) { # here the error
......................
}
//the file is:
..............
otherString value = e-30 otherString
otherString value = 4e-30 otherString
otherString value = 1e-20 otherString
.........................
To copy to clipboard, switch view to plain text mode
I have to extract the value of field "value" in a file a compare it as it was a numerical. But the shell says that $v it's not numeric....
Is it possible?
thanks,
Bookmarks