in reply to Re: Placement of $~ or $FORMAT_NAME
in thread Placement of $~ or $FORMAT_NAME

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

Replies are listed 'Best First'.
Re^3: Placement of $~ or $FORMAT_NAME
by Tux (Canon) on May 13, 2011 at 13:23 UTC

    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