in reply to Updating variable in a loop
You can use something like the following to construct one large string:
The $log .= "..." appends the string to $log each time through the loop so at the end, it's one large string.my $log = ""; for my $item (@stuff) { do_something($item); $log .= "Email sent to: $item<br>\n"; } print $log_file $log;
In Section
Seekers of Perl Wisdom