g is not a valid modifier for qr (see the description of qr under "Regexp Quote-Like Operators" in perldoc perlop for a list of valid modifiers). You can do what you want this way:
my $line = 'marker <this> <that> <other>'; my $rex = qr/(?:^marker\s|\G)<(.*?)>(?: |$)/; my @matches = ($line =~ /$rex/g);
In reply to Re: Global Modifier on a Pattern -- HOW!?!?!?
by tirwhan
in thread Global Modifier on a Pattern -- HOW!?!?!?
by bratwiz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |