$ cat pm_sh_escape.pl #!/usr/bin/env perl use strict; use warnings; my $cmd = "printf 'I\\x27ll'"; print $cmd . "\n"; print `$cmd` ."\n";