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 handle, if you have one.)

Type the word "linux_190": (just to make sure you're a human)

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