in reply to Re^2: the variable is lost
in thread the variable is lost
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: the variable is lost
by cruise (Acolyte) on Mar 09, 2012 at 08:42 UTC | |
|
Re^4: the variable is lost
by cruise (Acolyte) on Mar 09, 2012 at 08:26 UTC | |
by davido (Cardinal) on Mar 09, 2012 at 08:32 UTC |