{ { # creates $weekStr my $weekStr .= qq|<td align=center width=25%>$WEEK_PD_NAME </t +d>|; } # $weekStr is out of scope. Create a new one return $weekStr; }
It is easier to catch this if you use strict;
Update: I see you do use strict. The problem is that you have a second "my" inside the block. It creates a second variable $weekStr. It has the same name, but it is another variable!
In reply to Re: returning values
by fglock
in thread returning values
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |