in reply to Constants in regexes.
Is there anyway to use a use constant MYCHAR => 'X'; defined constant within a regex?Since it's just an interpolated string there's no 'simple' way of doing it ,but ...
use constant FOO => "abc"; my $str = "abcdefg"; $str =~ s<${\FOO}>(\U$&); print $str,$/; __output__ ABCdefg
_________
broquaint
|
|---|