in reply to Hella sort

You use
$a -> [0] =~ split /./;
which is wrong in various ways. First of all, =~ binds variables to regular expressions, substitutions or transliterations. split however splits its second parameter, or $_ if that parameter is not present.

Second, split /./ doesn't split on periods. It splits on anything that isn't a newline. You want split /\./ here, that splits on a period.

-- Abigail