in reply to codeperl -pe 's/\n/" " . /e' data/code

The answer to #1 is found in the perlop man page (NOT perlre, suprisingly enough). /e evaluates the right side of a s/// operation. In this example, " " . <> is evaluated rather than treated as a string.

The answer to #2 lies in the <> operator. This is a magic operator that reads the next line of the file mentioned on the command line. The -p has perl loop over the -e'd string until complete, printing (see perlrun man page). So data isn't a filehandle, it's a filename.