my ($val1,$val2)=("1.1.2","1.1.3"); print "Greater than\n" if ((sort byVersion ($val1,$val2))[-1] eq $val1);