Also the two ?: symbols at the beginning of the sets of parens make the parens non-capturing, in other words whatever is matched within the parens is not stored as a variable... BUT the parens within those parens that don't start with ?: will capture whats matched in a variable... If you like to tinker with things take the symbols out and see what happens...
($whole,$deci) = /(?:(\d*)\.?(\d+))|(?:(\d+)\.?(\d*))/;