Skip to main content
3 of 3
added 1 character in body
Ton Hospel
  • 14.9k
  • 1
  • 22
  • 45

Perl, 24 bytes

Includes +2 for -lp

Give input on STDIN:

rev.pl <<< Hello!

rev.pl:

#!/usr/bin/perl -lp
s%.%s/.?/chop/eg;$`%eg

Surprisingly this does not use the builtin reverse operator. That name is just soooo long, all solutions I could think of with reverse are at least 1 byte longer.

Ton Hospel
  • 14.9k
  • 1
  • 22
  • 45