This isn't a problem with PerlIO so much as a serious design flaw in PerlIO::via::MD5. It reads the file one line at a time, forcing PerlIO to call it many times before it completes. Consequently, setting $/ to undef before reading from the handle will make the speeds almost identical, and implementing PerlIO::via::MD5 as a call to &Digest::MD5::addfile makes it faster than your "regular" version.