in reply to Re: Regular expression help
in thread Regular expression help

Some questions regarding your solution.
  1. Why the /g modifier considering that you're matching (in scalar context) against $_ only once before $_ changes?
  2. Why a regexp anyway? Considering that "Required" is a fixed string, and you anchor it on both ends, $_ eq "Required" will do as well.
  3. Why quotes around $&?