Replace regex with looks_like_number()

sirhc++ for the pointer to Scalar::Util

Also, added a copyright notice, since I was asked if I wrote this or
found it.