echo 'authentication' | perl -F'' -lape '$_ = $F[0] . (@F-2) . $F[-1]'