It should be noted that in Perl, at least, this can be done with a single line:
This works because Perl tracks both sides of the assignment. It also works with more than one variable:
TMTOWTDI.