Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Placement of $~ or $FORMAT_NAME

by JavaFan (Canon)
on May 13, 2011 at 12:57 UTC ( [id://904657]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://904657]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2024-04-25 15:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found