#!/usr/bin/perl -w use strict; # clear out $~ $~=~s/.*//; sub ___{ # return this string 'chr('; } sub __{ # return this string 'print('; } sub _{ # foreach $_ (0 .. $#_) { for (0..$#_) { # append 'print(chr(' and the $_th element of @_ to $~ $~ .= __.___.$_[$_]; # append '))' to $@ $@ .= '))'; # if $_ matches the value of $#_ then you are done last if /$#_/; # append a '+' to $~ $~ .= '+'; } # the double quoted string "$~$@;" results in a value of # print(chr(9+print(chr(71+print(chr(79+print(chr(64+print(chr(74)))))))))); # eval the string to produce the output eval "$~$@;"; } # call the _ subroutine with the values given # they are in octal so change them to decimal # and they are (9,71,79,64,74) _(0011,0107,0117,0100,0112);