$_='$;JustAnotherPerlHacker'; # assign '$;JustAnotherPerlHacker' to $_ $_=reverse; # reverse it chop; # chop the '$' off chop; # chop the ';' off $_=reverse; # unreverse it s/([JAPH])/$".lc($&)/ge; # put spaces before the letter J,A,P,H and make them lowercase print; # print it