I only see 19 lines of code. Which line is #38?
Update: Thanks for clarifying your code now.
Your while loop is reading <$fh> into $_, which is clobbering your foreach loop's version of $_. Since the topic variable in a foreach loop aliases the elements you're iterating over (ie, $a and $b), clobbering $_ clobbers $a and $b.
Use an explicitly named topic variable for your foreach loop.
Dave
In reply to Re^3: the variable is lost
by davido
in thread the variable is lost
by cruise
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |