@method_ary =('met1','set1','wat1'); #### $line =~ s#public void $_(.*?)\);#/*$&*/#gs,for(@method_ary);