#!/usr/bin/perl -w
#
# $Revision: 1.4 $ $Date: 2011-02-23 19:46:27-05 $
# $Source: /home/vogelke/notebook/2011/0223/semi-numeric-sort/RCS/vsort,v $
# $Host: sys7.com $
# $UUID: e203cf3c-2861-3bf2-96bf-ab97973c32c3 $
#
#<vsort: sort version or section numbers intelligently.

use strict;
use Sort::Versions;

# Slurp in file of keys, sort things resembling version/section numbers.
my @unsorted = <>;
chomp(@unsorted);

# Newline after join() ensures the last entry in the array is printed.
my @sorted = sort { versioncmp($a, $b) } @unsorted;
print join("\n", @sorted), "\n";
exit(0);
