in reply to Re^2: Regex for matching dotted numbers
in thread Regex for matching dotted numbers
Your supplied test data doesn't suggest this. If it's not 3 or 4 numbers separated by a dot, what is it? If it is separated by a dot, you can check scalar(@ver) to see if it's 3 or 4 numbers, and check $ver[0] to get your major number, and continue from there. You could even use one of the many switch analogs from CPAN to implement switch statements on the version numbers.