in reply to Transforming "\r\n" to '\012\015'
Maybe not the best way:
See sprintf for 'o'c:\@Work\Perl>perl -wMstrict -le "print join '', map sprintf('%03o', $_), unpack 'C*', qq{\r\n}; " 015012
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: <%-{-{-{-<
|
|---|