in reply to Re^3: PerlIO file handle dup
in thread PerlIO file handle dup
MCE's read is how read behaves when an MCE::Shared file handle is used. MCE must create an I/O layer which makes Perl's read work differently, but it does not behave the same. First of all, AFAIK, Perl's read does not support the type suffix such as "k". More importantly, Perl's read will read the exact length of characters in the 3rd argument (unless EOF). MCE's read will do that, but then continue reading until it reaches $/ so it does not split records between reads. This is very useful, but still confusing. It would make more sense to have read behave the same with or without MCE, but implement another function such as "getlines".
MCE::Shared::Handle
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: PerlIO file handle dup
by marioroy (Prior) on Mar 07, 2017 at 20:05 UTC |