in reply to (bbfu) Re(2): Setting a filehandle attribute for just one filehandle
in thread Setting a filehandle attribute for just one filehandle

The problem I heard asked was:

How can I have a per-filehandle $/ so I don't have to do an explicit local $/ = something every time I change file handles?

My solution answers this by moving the local $/ = ... out of the user's program entirely, and adding per-file-handle setting of $/. How is this not an improvement?

  • Comment on Re: (bbfu) Re(2): Setting a filehandle attribute for just one filehandle

Replies are listed 'Best First'.
(bbfu) (explicit/implicit local) Re(4): Setting a filehandle attribute for just one filehandle
by bbfu (Curate) on Jun 27, 2001 at 19:30 UTC

    Ah.. I guess the key word being "explicit." I guess I was thinking of it more in a sense that princepawn was trying to avoid doing the local each time through, not just hide it. As I said, different interpretations of the question. :-) Your solution certainly does accomplish your interpretation of the problem (and after a re-reading, your interpretation seems to be closer to what he was asking). ++

    bbfu
    Seasons don't fear The Reaper.
    Nor do the wind, the sun, and the rain.
    We can be like they are.