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

Further to Eily's post: Instead of
    print $$self $data;
try
    print { $$self } $data;
(untested).


Give a man a fish:  <%-{-{-{-<

Replies are listed 'Best First'.
Re^4: "scalar found where operator expected" while printing to a glob ref
by seki (Monk) on Mar 01, 2016 at 21:36 UTC

    Yes, the block returning the dereferenced file handle is doing the job.

    Even if it is not very explicit in the documentation, it is suggested in the last paragraph.