in reply to Transforming "\r\n" to '\012\015'

Maybe not the best way:

c:\@Work\Perl>perl -wMstrict -le "print join '', map sprintf('%03o', $_), unpack 'C*', qq{\r\n}; " 015012
See sprintf for  'o' template | format specifier.

Update: Or maybe:

c:\@Work\Perl>perl -wMstrict -le "my $x = qq{\r\n}; $x =~ s{(.)}{ sprintf '%03o', ord $1; }xmsge; print qq{'$x'}; " '015012'


Give a man a fish:  <%-{-{-{-<