http://www.perlmonks.org?node_id=435818


in reply to Re^2: Perl oddities
in thread Perl oddities

Often you can just assign the results of the match.

But not if you use /g, as /g acts quite differently in scalar and in list context.