my $phrase = 'who lives in a pineapple under the sea?'; @array = split //, $phrase; for $item (@array){ my $code = ord($item)+3; print chr($code);} __END__ prints : zkr#olyhv#lq#d#slqhdssoh#xqghu#wkh#vhdB