1 while(s/(pattern)/&do_something($1)/ge);