in reply to Side Effects

Most likely, somehow, $g::TaskList[0] is an alias to $_ (although I'm not entirely sure how that happened). And while(<LOG>) does not localise $_, meaning that you've just clobbered $_ through the while. Try putting your body into:

{ local $_; $Body .= "$_<br>" while (<LOG>); }
I'm betting the problem goes away here.

Replies are listed 'Best First'.
Re^2: Side Effects
by ysth (Canon) on Apr 07, 2005 at 04:21 UTC
    The preferred way to do this is local *_; (which of course also affects @_, &_, etc.). local $_; can have problems if what $_ is aliased to is magic. In 5.10, the preferred way will be my $_;.