@newlist = grep (s/(\d+-PVC_\d+)/ &function1($1)/e, @oldlist); #### @newlist = grep (s/(\d+-PVC_\d+)/ &function1($1) \/ &function2($1)/e, @oldlist);