$str = "this is a string"; @str = split /\s/, $str; print pop(@str);