in reply to Quick question on matching

Yes, you need to use parentheses, like this:

if (/\b(API|APIN|UWI)\s*\./) { somesub($1); }
The parentheses group parts of the regular expression, in addition to "capturing" parts of it that you can use in subsequent code. Both functions are important here: I'm guessing that you actually wanted to match just the letters, not the surrounding whitespace. In other words, I'm guessing that you didn't want what your original expression was doing: matching one of Because the alternation character | doesn't bind very tightly.

More information at perlre.

HTH