use IO::File; $fh = IO::File->new("< file"); $fh = IO::File->new("file", "r"); $fh = IO::File->new("file", O_WRONLY|O_APPEND);