Created
June 13, 2010 23:41
-
-
Save juster/437097 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# Requires my ALPM perl module, which will probably break when pacman | |
# 3.4.0 comes out... unless I have time to hack on ALPM before then. | |
use warnings; | |
use strict; | |
use 5.010; | |
use ALPM; | |
*vercmp = *ALPM::Package::vercmp; | |
my @vers = qw/ 1.9.0 1.10.0 1.11.0 2.0.0 /; | |
my $last = shift @vers; | |
while ( defined ( my $next = shift @vers )) { | |
my $is = ( vercmp( $last, $next ) < 0 ? q{is} : q{is not} ); | |
say "$last $is less than $next"; | |
$last = $next; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment