abs52 has asked for the wisdom of the Perl Monks concerning the following question:
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; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Comparing Two Numbers
by choroba (Cardinal) on Jan 05, 2021 at 09:43 UTC | |
by abs52 (Novice) on Jan 05, 2021 at 10:03 UTC | |
by choroba (Cardinal) on Jan 05, 2021 at 10:07 UTC | |
by abs52 (Novice) on Jan 05, 2021 at 10:15 UTC | |
by Ratazong (Monsignor) on Jan 05, 2021 at 11:07 UTC | |
|
Re: Comparing Two Numbers
by davido (Cardinal) on Jan 05, 2021 at 16:32 UTC | |
by Anonymous Monk on Jan 05, 2021 at 19:56 UTC |