in reply to Re: LaTeX: regex or xpath?
in thread LaTeX: regex or xpath?

my @equations = /\$([^$]+)\$/;

To get all matches, you'd need the /g option.  Also, $] is a special variable, so the dollar sign must be escaped here.