split//,pop #### pop=~/./g # or just 1 char if you put in the 's' modifier