On Wed, 02 Aug 2000 20:58:51 -0700, Nathan Wiger wrote:

>=head1 IMPLEMENTATION
>
>The open() and opendir() functions would have to be altered to take one
>argument (not two) and return the corresponding file object or undef.

Actually, open() currently CAN have just one parameter. What it does, is
use a filehandle and a scalar variable with the same name, so

        open FH

is the same as 

        open FH, $FH;

But that is conceptually tied so closely to typeglobs (filehandle and
scalar in same typeglob), that it may just as well become obsolete. I
wonder if it works with lexical variables anyway.

        my $FILE = $0;
        open FILE or die "Error: $!";
        print <FILE>;
-->
        Use of uninitialized value in open at test.pl line 3.
        Error:  at test.pl line 3.

Nope. Get rid of it! (p.s. Has anybody ever actually used this feature,
apart for Perl Golf?)

-- 
        Bart.

Reply via email to