[boulder.pm] grabbing ()
Eric Shore Baur
baur at frii.com
Mon Jan 31 13:57:49 CST 2000
I'm working on a project where I'm looking through PS files for
attendace data (at my high school)... and I'm basically just looking at
anything in () by doing:
@keep = map { /\((.*)\)/ } @lines;
For the most part, this pulls out everything that would be on
the printed page (and some extra stuff that I can just ignore). The
problem I've run into (at least in part) is lines that contained () to
start with. A line that looks, when printed, like this:
*** Period 4: IMP MATH 1A (22)
becomes:
*** Period 4: IMP MATH 1A \(22\)
Do I have to look back through the whole array to fix that, or can
I do it in the same line with the map? (or, is there a better way than
map to do this?)
Thanks for any ideas,
Eric
More information about the Boulder-pm
mailing list