Refactor markupPerlVars()

Try to do a better job of parsing out perl variables from the sources.
Instead of more complicated parsing of the before/match/after parts,
we're doing 2 more comprehensive regexes.  If it doesn't match either, then
advance 1 character and try again.