in reply to Re: mapping through filehandles
in thread mapping through filehandles

That can be simplified to
map { print $_ $log } (STDOUT, R);
without the need for the $stdout_handler or $r_handler.

Replies are listed 'Best First'.
Re: Re: Re: mapping through filehandles
by larsen (Parson) on Oct 28, 2001 at 21:41 UTC
    Yes, as Anonymous Monk said, one could be lazy, without using any reference to file handles, but this practice has the backlash that is does not work using strict. A solution (but I personally don't like it) is to use a throw-away block in order to conjuring with barewords without strict:
    { no strict; map { print $_ $log } (STDOUT, R); } $foo = "bar"; # Error! here we're re-using string

    Update: runrig's one is the best way to be lazy :)