>         $fh = open socket "tcp://www.perl.com:80";

This is not bad, I hadn't thought of making it URI-like. There is
already a proposal in the RFC to replace socket() with:

   # Open a client socket
   # By overloading < and > we can do clients and servers
   $socket = open socket "< 25", PF_INET, SOCK_STREAM, TCP;
   @input = <$socket>;
   close $socket;

As it stands, the RFC *does* propose to replace all these functions:

   # Replaced by 'open dir'
   opendir
   readdir         # dir->read instead
   closedir        # close instead
   seekdir         # dir->seek instead
   rewinddir
   telldir
   seekdir

   # Replaced by 'open sys'
   sysopen
   sysread         # sys->read instead
   syswrite        # sys->write instead

   # Replaced by 'open socket'
   socket
   setsockopt      # socket->options
   connect         # overload <> or socket->connect
   shutdown        # close instead   

with handlers and open().

Everyone: Before responding, please take a second to read the section
called "Function Deletions" towards the bottom of
http://dev.perl.org/rfc/14.pod, just so we don't have to rehash the same
stuff here. Thanks.

-Nate

Reply via email to