use strict; use warnings; my $test = "fee fi fo free"; if ($test =~ m!((??{ substr($test,0,$_) }))!) {}; #### DB<1> V main # $_ never appears after this command DB<2> s main::(bah4.pl:6): if ($test =~ m!((??{ substr($test,0,$_) }))!) {}; DB<2> V main # $_ never appears after this command DB<3> s main::((reeval 2)[bah4.pl:6]:1): DB<3> V main #At this point again variables in main are #listed there is a line: # $_ = 'fee fi fo free' DB<4> s Argument "fee fi fo free" isn't numeric in substr at (reeval 2)[bah4.pl:6] line 1.