in reply to Re: use shift function in regex
in thread use shift function in regex

That should be

perl -e "$var = shift; $var=~s/^(\Q$var\E)$/\u$1/s; print $var;" hi

Text treated as a pattern doesn't (necessarily) match itself.

Replies are listed 'Best First'.
Re^3: use shift function in regex
by suhailck (Friar) on Nov 24, 2009 at 08:46 UTC
    Thanks ALL for explaining me the right way to perform the task :)