in reply to Comparing Version Numbers

I don't think there is a general soultion that will work in all cases. There are just too many ways to use version numbers and put them in a filename.

You might be able to get the correct number much of the time with something like this:

# $filename declared elsewhere $filename =~ /\A [^-]+ # Read until the first '-' ([\d\.]+) # Grab a series digits and '.' chars /x; my $version = $1;

But that will fail on many version numbering systems.

----
Reinvent a rounder wheel.

Note: All code is untested, unless otherwise stated