Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Logical Operation - Numeric vs Sting

by reasonablekeith (Deacon)
on Jan 17, 2006 at 11:42 UTC ( [id://523727]=note: print w/replies, xml ) Need Help??


in reply to Logical Operation - Numeric vs String

It's probably the multiple decimal places that are causing the problem, perl is recognising the value as a string, and giving you a warning (quite reasonably IMHO).

your best bet is to strip the primary version number and compare that...

$sw_fields[2] =~ m/^(\d*)/; # match the primary version if ($1 and $ver <= $1) { # do your stuff
(untested)
---
my name's not Keith, and I'm not reasonable.

jdporter reparented from 523716

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://523727]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-24 15:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found