josephjohn has asked for the wisdom of the Perl Monks concerning the following question:
For eg: When i look for major version 10, all the following should get counted 10.00.359, 10.01.1000, 10.02.2000 When i do a numeric comparison for this in my code i get warnings during run.
Argument "10.00.359" isn't numeric in numeric le (<=) at SWCompliance.pl line **
The code snippet is given below.
Am i doing something wrong or is there an alternate method?$ver = 10; #loop and split the line if ($ver <= $sw_fields[2]) { $by_sw{$sw_fields[0]}{$sw_fields[2]}++; $swvercount++; }
2006-01-17 Retitled by planetscape, as per Monastery guidelines
Original title: 'Logical Operation - Numeric vs Sting'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Logical Operation - Numeric vs String
by ysth (Canon) on Jan 17, 2006 at 03:32 UTC | |
|
Re: Logical Operation - Numeric vs String
by McDarren (Abbot) on Jan 17, 2006 at 03:04 UTC | |
|
Re: Logical Operation - Numeric vs String
by Old_Gray_Bear (Bishop) on Jan 17, 2006 at 03:05 UTC | |
|
Re: Logical Operation - Numeric vs Sting
by reasonablekeith (Deacon) on Jan 17, 2006 at 11:42 UTC | |
|
Re: Logical Operation - Numeric vs Sting
by Aristotle (Chancellor) on Jan 17, 2006 at 11:05 UTC | |
|
Re: Logical Operation - Numeric vs String
by aquarium (Curate) on Jan 17, 2006 at 13:54 UTC | |
|
Re: Logical Operation - Numeric vs Sting
by northwind (Hermit) on Jan 17, 2006 at 12:42 UTC |