in reply to Swap the characters

perl -le '$_ = "YANDS";s/(.)(.*)(.)/$3$2$1/ && print'

citromatik