The build-in "open" function has a tons of functionality that could not be replicated using IO::File. Opening file-system files is just one of the cases that CORE::open covers. There are a lot of other cases as: dup-ing a fh, opening fh to memory location, fork-ing a child and splicing it's STDOUT to opened fh (pipes) etc.
In short, with just one function with its little idiosyncratic language for open modes you could do almost all the things you could do with all IO::* modules (except sockets). You could hate it but there are people that like it, for various reasons.
I do not fully understand your proposition for stop using CORE::open and start using IO::File. But why not use instead IO::Pipe? Or IO::String?
In reply to Re: IO::File vs CORE::open
by karavelov
in thread IO::File vs CORE::open
by EvanCarroll
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |