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


in reply to Re: Web based perl REPL
in thread Web based perl REPL

You're losing $1 because it's doing other regexen in between executions.