in reply to Logical Operation - Numeric vs String
You could do a string match instead:
but its hard to check for major version >= 10 that way. Depending on what all you are doing, spliting up the version is probably better:if ($sw_fields[2] =~ /^$ver\./) # does it start with $ver and .?
my ($major, $minor, $subminor) = split /\./, $sw_fields[2]; if ($major >= 10)
|
|---|