Syntactic Confectionery Delight | |
PerlMonks |
Re: Threads reinitializing the variableby rjt (Curate) |
on Aug 05, 2013 at 14:24 UTC ( [id://1047915]=note: print w/replies, xml ) | Need Help?? |
This will output Total count : 5, because you only increment $total_count by one on each iteration. You probably want $total_count += $ret instead (or $total_count += $t->join, if you won't be using the return value for anything else, i.e.):
use strict; use warnings; omitted for brevity.
In Section
Seekers of Perl Wisdom
|
|