Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

how do I get a reference to a format? *formatname{FORMAT} dosen't work...

Replies are listed 'Best First'.
Re (tilly) 1: Format references
by tilly (Archbishop) on Mar 24, 2001 at 07:58 UTC
    I haven't played much with formats, but judging from perlref if anything would work it would be:
    *foo{IO}
      Actually, *foo{IO} only contains filehandle foo, dirhandle foo, and socket foo. There dosen't seem to be a way to get a reference to a format, the best you can get is an entire glob: *foo
        Thanks, that goes in the bucket of odd facts I might need some day.

        However I would also suspect that this area of Perl has not been extensively tested. I would not be suprised if the intrepid explorer encountered a few interesting features...