http://qs1969.pair.com?node_id=421397


in reply to Unique List of Common Characters Between Two Strings

Since you throw away the hash I think you can simplify the grep a little:

grep $u{ $_ }-- >0, split //, $str
---
alter ego of demerphq