in reply to Re^3: "scalar found where operator expected" while printing to a glob ref
in thread "scalar found where operator expected" while printing to a glob ref

Well, I've just checked and it is not the actual package code.
I remember now that I found the example of custom ConsumerInterface in the documentation of XML::SAX::Writer
sub output { my $self = shift; $$self .= uc shift; }
and I have adapted it to my needs: replacing the string scalar to store the data by a file handle. Thus I am responsible for print $$self $data;. Actually I was surprised for not having the warning while using the stock module... Mea culpa.

Replies are listed 'Best First'.
Re^5: "scalar found where operator expected" while printing to a glob ref
by MidLifeXis (Monsignor) on Mar 03, 2016 at 18:30 UTC

    What line 3 ($$self .= uc shift) is saying (just for those not understanding the above code) is that it dereferences the thingy that $self points to, and appends the upper cased version of the next parameter to thingy, putting the results back into thingy.

    --MidLifeXis