Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
$string =~ s/ord(226)/'/ig;
But perl is interpreting the 'ord(226)' as a literal.
How do I use ord() in a regular expression? Thank you!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using 'ord' in a regular expression for substitution
by Corion (Patriarch) on Aug 25, 2010 at 15:03 UTC | |
|
Re: Using 'ord' in a regular expression for substitution
by ikegami (Patriarch) on Aug 25, 2010 at 15:29 UTC | |
|
Re: Using 'ord' in a regular expression for substitution
by jwkrahn (Abbot) on Aug 25, 2010 at 15:24 UTC | |
by JavaFan (Canon) on Aug 25, 2010 at 15:29 UTC | |
|
Re: Using 'ord' in a regular expression for substitution
by JavaFan (Canon) on Aug 25, 2010 at 15:04 UTC | |
|
Re: Using 'ord' in a regular expression for substitution
by roboticus (Chancellor) on Aug 25, 2010 at 15:07 UTC | |
by JavaFan (Canon) on Aug 25, 2010 at 15:24 UTC |