538 my $b_is_fh = (ref($out) =~ /FileHandle/); 539 my $pout = sub { 540 my ($msg) = @_; 541 $b_is_fh and print $out "$msg\n"; 542 $b_is_fh or $out->out($msg); 543 };