in reply to replace special character with its unicode

Please suggest as how do we use ord as function in search and replace.

Use the flag for which is documented to evaluate the right-hand side as code

It is e

  • Comment on Re: replace special character with its unicode

Replies are listed 'Best First'.
Re^2: replace special character with its unicode
by Ea (Chaplain) on Nov 14, 2011 at 13:11 UTC
    To clarify the above answer, the flags are after the final / in the regex, where you have already put the g

    as in s/\"/ord($1)/ge

    perl -e 'print qq(Just another Perl Hacker\n)' # where's the irony switch?