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

015 is "octal", and \ is escape so , octal escape, so octal escape -> Re: syntax of Data::Dump (perlquote oct octal escape perlrebackslash) -> oct

$dec_perms = (stat("filename"))[2] & 07777; $oct_perm_str = sprintf "%o", $perms;
So there it is
$ perl -le" print sprintf q{\\%03o}, ord $_ for qq{\r}, qq{\n} " \015 \012 $ perl -le " $_ = qq{\r\n\r\n}; s{(.)}{sprintf q{\\%03o}, ord $1}gse; +print; " \015\012\015\012