$ perl -CO -Mutf8 -lE '$_="==alLE BÄRen MÖGen äpfel und birNEN=="; s/(\w+)/\u\L$1/g; print' ==Alle Bären Mögen Äpfel Und Birnen==