> 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

I think this syntax (and the other variations posted) is highly dodgy.
Admittedly, it does look cooler, but consider this:

   open 'http://www.yahoo.com/';
   open 'https://www.etrade.com/';        # what module? https?

No matter what, you're going to have to embed something in there that
decides for you what todo. What if an "httpx:" method comes out?? Will
Perl < 6.2.1 (when the "httpx:" hook was added) not work?

Also, what if you write your own module, say "MyHttp", that you want to
open certain documents? How do you do this? The more general notation:

   open MyHttp, 'http://www.yahoo.com/', $custom, $args;

Allows you to do this simply, in a syntax that is already established.

-Nate

Reply via email to