I would expect it to not going into the if loop as 450.80.82 is great than 450.87 Have i done something wrong Thanks#!/usr/bin/env perl use version 0.77; my $wanted = '450.80.82'; my $installed = '450.57'; if (version->parse($installed) >= version->parse($wanted)) { INFO "$installed newer than or same as wanted ($wanted), not doing a +nything\n"; exit 0; }
In reply to Comparing Two Numbers by abs52
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |