| v $test =~ s{\[\[(.+?)[^\]\]]}{ print "FOO: $1\n"; }ge; #### while ($test =~ s{\[\[(.+?)[^\]\]]}g) { print "FOO: $1\n"; }