IO::Any aims to provide read/write anything. It tries to guess what the "anything" is based on some rules. WWW: https://metacpan.org/release/IO-Any