On Wed, Aug 09, 2000 at 07:41:54AM -0700, Nathan Wiger wrote:
> > It occurs to me that one could embed the class name right in the first
> > argument:
> > 
> >   $perl = open 'ftp://ftp.linux.activestate.com/pub/staff/gsar/APC/'
> >     or die "ActiveState ftp site is hosed again: $!";
> 
> Yeah, the next version is going to include a syntax that's very similar
> to this, although a little more Perlish:
> 
>    open '/etc/passwd';     # file is implied
>    open ftp 'ftp://ftp.linux.activestate.com/'
>    open dir '/usr/local/bin'
>    open http 'http://www.yahoo.com/'

How about this?

        open '/etc/passwd';             # file
        open '/usr/local/bin/';         # directory (note the trailing '/')
        open 'ftp://ftp.perl.org/';     # ftp
        open 'http://www.yahoo.com/';   # http
        open 'ldap://ldap.bigfoot.com/';# ldap

Of course the last three would automagically bring in the proper
modules that are part of the standard perl distribution.

-Scott
-- 
Jonathan Scott Duff
[EMAIL PROTECTED]

Reply via email to