use strict; use warnings; while () { next if ! /PP: \((\d+)\)/; print "Matched $1\n"; } __DATA__ PP: (899040) Jane Smith