http://www.perlmonks.org?node_id=1062772


in reply to Regex returns match the first time. It returns everything thereafter

What do you think
/line/../\\Z/
does?

What it actually parses out as is this:

perl -MO=Deparse -e'$line =~ /line/../\\Z/' $line =~ /line/ .. /\\Z/;
That means it's a flip-flip (perlop for more info on that), which means it stays true after the first regex matches until the 2nd matches (which it probably never does).

What were you trying to do?


Mike