use strict; use warnings; use Data::Dump 'dd'; $_ = 'a'; dd s/(?=(a))/b/; dd @-; dd $_; $_ = 'a'; dd s/(?=(a))/b/g; dd @-; dd $_;