in reply to Re: Re: perl in DOS woes
in thread perl in DOS woes
"Of course you can use regular file operators on a binmode file" I said as I slapped myself silly reading your reply. "Why, I've done it a hundred times myself!" And I'd forgotten about how useful the input record seperator can be, especially setting it to undef. I think that using
would have made things a lot easier sometimes too.$/=\<a number>;
I have fallen prey to the fallacy of assuming that my habit is actually a recommended practice. When I'm dealing with a "binary file" I almost always use read, which makes it clear to me later what I was intending to do with it. On that somewhat flimsy notion, I beg forgiveness for misleading comments.
I have spent a couple of hours attempting to recreate problems I could swear I have had with null bytes (\x0) in files but have been unable to do -- please ignore that part of my answer as well.
|
|---|