in reply to regex (\G) vs. (^|\G)
By the way, the title is supposed to be
regex (\G) vs. (^|\G)
Rather than
regex (\G) vs. (^\G)
But there is nowhere to go back and edit the title (feature request).
my @a=qw(random brilliant braindead); print $a[rand(@a)];