Skip to content

Instantly share code, notes, and snippets.

@rgorsuch
Created November 24, 2015 15:55
Show Gist options
  • Save rgorsuch/9016a92f84ada9017506 to your computer and use it in GitHub Desktop.
Save rgorsuch/9016a92f84ada9017506 to your computer and use it in GitHub Desktop.
use Term::ReadKey;
ReadMode 2;
print "# ";
chomp(my $phrase = <STDIN>);
print "\n" . join("", map { sprintf "\\%o", ord } split("", $phrase)) . "\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment