> 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
- Re: RFC 14 (v2) Modify open() to supp... Chaim Frenkel
- Re: RFC 14 (v2) Modify open() to supp... Nick Ing-Simmons
- Re: RFC 14 (v2) Modify open() to support ... Piers Cawley
- Re: RFC 14 (v2) Modify open() to supp... Bart Lateur
- Re: RFC 14 (v2) Modify open() to support File... Tom Hughes
- Re: RFC 14 (v2) Modify open() to support ... Tom Hughes
- Re: RFC 14 (v2) Modify open() to supp... Chaim Frenkel
- Re: RFC 14 (v2) Modify open() to supp... Piers Cawley
- Re: RFC 14 (v2) Modify open() to support ... Piers Cawley
- Re: RFC 14 (v2) Modify open() to support File... Jonathan Scott Duff
- Re: RFC 14 (v2) Modify open() to support FileObje... Nathan Wiger
- Re: RFC 14 (v2) Modify open() to support File... Nathan Wiger
- Re: RFC 14 (v2) Modify open() to support File... Johan Vromans
- Re: RFC 14 (v2) Modify open() to support File... Nick Ing-Simmons
- Re: RFC 14 (v2) Modify open() to support FileObjects a... Graham Barr
- Re: RFC 14 (v2) Modify open() to support FileObje... Casey R. Tweten
- Re: RFC 14 (v2) Modify open() to support File... Nathan Wiger