http://qs321.pair.com?node_id=168186


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); }