I was wondering if there is a global matching flag, considering there is a global replacement flag (/g)
I'm using this workaround to make multiple matches in a string
while(!$stop_var)
{
if($source =~ /(PATTERN)/i)
{
push(@matches, $1);
$source = $';
}
else
{
$stop_var =1;
}
}
is there an easier way?