You're viewing a comment by poisonbit and its responses.

January 08, 2010, 11:18

Another string manipulation, easy to remember: reverse

$ perl -le '$_=q{dlrow olleh}; print scalar reverse;'
hello world

/usr/bin/tac does it by lines, like 'cat' but reversing the file. Perl reverse() can work with scalar, list (the default) and hash variables.

Reply To This Comment

(why do I need your e-mail?)

(Your twitter name, if you have one. (I'm @pkrumins, btw.))

Type the first letter of your name: (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.