sub luhn { # 1 2 3 4 5 6 #23456789012345678901234567890123456789012345678901234567890 my$s;$_=reverse@_;s/(.)(.)/$1.$2*2/ge;$s+=$_ for/./g;!chop$s }