in reply to Extracting the number in a file and get the value and output to the other file
I find it often helps to write small test scripts to figure out how to solve a specific problem. They often look something like:
use strict; use warnings; while (<DATA>) { next if ! /PP: \((\d+)\)/; print "Matched $1\n"; } __DATA__ PP: (899040) Jane Smith
where the __DATA__ section contains a selection of different lines to exercise the match.
|
|---|