in reply to Finding the latest available version of a program

The hash doesn't actually make it easier, an array would do just as well. Something like:
my $package = "gcc"; my $latest_vers = (sort grep /^\Q$package\E-/, keys %apps)[-1];