http://www.perlmonks.org?node_id=1013845


in reply to s/\r\n/\n/ passed as command line parameters not working

The variable $replace contains two characters, \ and n. You can create a Perl expression from its value and evaluate it:
s/$search/'"'.$replace.'"'/eeg;
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Replies are listed 'Best First'.
Re^2: s/\r\n/\n/ passed as command line parameters not working
by ggrise (Initiate) on Jan 17, 2013 at 18:15 UTC
    Thanks, that fixed the code. I appreciate your time and I learned something.