in reply to Placement of $~ or $FORMAT_NAME

From the documenation:
       HANDLE->format_name(EXPR)
       $FORMAT_NAME
       $~      The name of the current report format for the currently
               selected output channel.  Default is the name of the
               filehandle.  (Mnemonic: brother to $^.)
You change the default filehandle after initially setting $FORMAT_NAME.

Replies are listed 'Best First'.
Re^2: Placement of $~ or $FORMAT_NAME
by loris (Hermit) on May 13, 2011 at 13:08 UTC

    Ah, so $~ isn't set for whichever filehandle is current, but just for the one that is current at the moment. If I change the filehandle with select() I also have to reset $~.

    Thanks,

    loris

      Take care when switching: also $: and $^A can be affected and $%, $=, $-, and $^ will change on a select. The values might not always be reliable :) YMMV


      Enjoy, Have FUN! H.Merijn