Scalar::Util
's looks_like_number
seems to be the commonly suggested way to determine whether a string is a number.
Why does it consider the string "0 but true"
to be a number ?
use Scalar::Util 'looks_like_number';
print looks_like_number("0 but true"); # 1