xyz match1: pos=2 xyz 0 0 2 2 match2: pos=2 xyz 2 2 2 2 Warning: something's wrong at /tmp/Perl-1.pl line 20. Use of uninitialized value in print at /tmp/Perl-1.pl line 21. match3: pos= xyz 2 2 2 2