http://www.perlmonks.org?node_id=81430


in reply to Re: Scoping Variables
in thread Scoping Variables

while (<NEW_HIST>){ /^(\w{3}\s+\w{3}\s+\d{1,2})/; my $pass_down_date = $1 if (/$tool/){ print "$pass_down_date"; $print_checker = 1; } if (/$stop/){ $print_checker = 0; } if ($print_checker){ print "$_ <br>\n"; } }

this is the actual code in the loop. $pass_down_date is being matched, it will print outside of any of the if loops. If I try to print it out inside any of the if loops, it comes back with what I believe is an empty string.
by the way, strict and -w are on. :)

Stuffy