Where does all these undefs come from? [gisle@ask gisle]$ perl -we '$_ = "f\n"; /f/g; use Data::Dumper; print Dumper(\@-, \@+);' $VAR1 = [ '0', undef, undef, undef, undef, undef, undef ]; $VAR2 = [ '1' ]; When we match against "fa" instead of "f\n" it is all normal: [gisle@ask gisle]$ perl -we '$_ = "fa"; /f/g; use Data::Dumper; print Dumper(\@-, \@+);' $VAR1 = [ '0' ]; $VAR2 = [ '1' ]; [gisle@ask gisle]$ perl -v This is perl, v5.8.2 built for i686-linux In the real app perl runs out of memory when I access @- after a /g match, but I have not yet been able to reproduce that in a smaller test case. But perl-5.8.0 seems to do that on the first example above. Any ideas what's wrong? --GisleThread Next