in reply to meaning for the code

In plain English, here is what the code tries to do:

Examine the value of $_
Check if it contains a decimal number, or an integer
If it does, assign those values to $whole and $deci

The expression used does handle boundary conditions, which is what make it appear complex.

It accurately evaluates numbers like 324 44.55 44. .44 and 0.445

     "As you get older three things happen. The first is your memory goes, and I can't remember the other two... " - Sir Norman Wisdom