Win8 Strawberry 5.8.9.5 (32) Fri 11/06/2020 18:48:09 C:\@Work\Perl\monks >perl -Mstrict -Mwarnings use Data::Dump qw(pp); my $linkheader = 'axbyczSelfaxbycz'; printf "A: '$linkheader' (\$1 is %s) \n", pp $1; (my $link1 = $linkheader) =~ s/ .*? (Self)/$1/gx; printf "B: '$link1' (\$1 is %s) \n", pp $1; (my $link2 = $link1) =~ s/a/$1/g; printf "C: '$link2' (\$1 is %s) \n", pp $1; ^Z A: 'axbyczSelfaxbycz' ($1 is undef) B: 'Selfaxbycz' ($1 is "Self") Use of uninitialized value in substitution iterator at - line 9. C: 'Selfxbycz' ($1 is undef)