see perlre: \l lowercase next char$ perl -e '$b="H";( $a = "hello" ) =~ s/^\l$b/Y/; print $a' Yello
So, after interpolation, "\l$b" gives "\lH" ie "h" and you obtain s/h/Y/
In reply to Re: How to use \l and \u in regex mathing patterns?
by brx
in thread How to use \l and \u in regex mathing patterns?
by pat_mc
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |