in reply to Re: global regex
in thread global regex

I thought I will extend my previous reply with this code to show you that $1 is filled up over and over with new DATA...
use strict; use warnings; my $match=0; while(<DATA>){ while(my $text = /Name: *(\w+)/g){ ++$match; print "Match no. $match is $1\n"; } } __DATA__ Name: Alpha Name: Beta Name: Gamma Name: Epsilon Name: Delta
Excellence is an Endeavor of Persistence. Chance Favors a Prepared Mind