in reply to substitution of a string with Square brackets.

s#$methodname\((\Q$2\E)\)#private $methodname($2)#g

should fix it... although I am somewhat suspicious as to what you are doing with $2...

Tom Melly, tom@tomandlu.co.uk