[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Is binmode needed in MacPerl?




pubs@proper.com said:
> Do I need to use binmode(HANDLE) before I do a read on a non-text 
> file in MacPerl? I would hope not, but wanted to check... 

No, it isn't strictly needed.  It does no harm to have it there, though.

However, you should ALWAYS do a binmode(HANDLE) when reading any file that 
is not in the native OS's text file format.

Not only does this provide a "head's up" (i.e. documentation), but eases 
the problems of porting the script to another platform.  Maybe, you don't 
intend to port this one, but....
-- 
Hal Wine <hal@dtor.com>