in reply to Using loops inside an 'if' statement

Could it be the head-slappingly obvious tromping all over $_ ?
my $checkbox = 1; $_ = 'Wowza'; print "Before the loop we see \$_ as '$_'\n"; if( $checkbox ) { while( <DATA> ) { chomp; print " We see \$_ is '$_'\n"; } } print "After the loop we see \$_ as '$_'\n"; __DATA__ There I was, minding my own business, when ...
will output
Before the loop we see $_ as 'Wowza'
  We see $_ is 'There I was, minding my own business, when ...'
Use of uninitialized value in concatenation (.) or string at jonnyfolk1.pl line
18, <DATA> line 1.
After the loop we see $_ as ''