#!perl -lp $_.=/b/?ni:n if/wa/;s/una.+/naraion/;$_.=/t/?sagi:nagi if/ou$/;s/tt.+/$&kanku/;s/su$|ama\K/usu/;$_=(/s/?yukaina:tanoshii).' nakamaga popopopo-n'if/ /;s/a$/anbou/
Note that non-ascii characters in the above source code will be escaped (such as \x9f).