in reply to Regexp matched part to lower case

You can make use of lc() function to change into lower case and add 'e' option modifier.

Prasad

Replies are listed 'Best First'.
Re^2: Regexp matched part to lower case
by tomson (Initiate) on Jun 02, 2005 at 07:15 UTC
    You think like this? $string =~ s/{\@see\s+((\w+\.)+)(\w+)#(\w+)}/<idl package="lc($1)" name="$3" anker="$4"/>/eg; But that's not working ;-)
      the right hand side will be evaluated. Thus, treat it not as surrounded by quotes, but as an expression.

      like:

      s/.../"<idl package=\"".lc($1)."\" name=\"$3\" anker=\"$4\"\/>"/ge

      Update: sorry, forgot the "'s

      Here \ is a special character before @ so you have to escape it by \\.

      Then do slight change in replacement part.

      /"<idl package=\"".lc($1)."\" name=\"$3\" anker=\"$4\"\/>"/esi;

      updated

      Prasad