Convert the clean alias script to perl