in reply to Quick question on matching
You can use a reference, place parens around the part you want, and use $1 to access that part of the regex. If you have more then one set of parens, you would use $2 to access the second one, $3 to access the third, etc.
if (/\b(API|APIN|UWI)\s*\./) { somesub($1); }
In Section
Seekers of Perl Wisdom