On 19/09/2007, Dintelmann, Peter <Peter.Dintelmann dresdner-bank.com>
> > state $fh // open $fh, "<",
"file" or die $!;
>
> Global symbol "$fh" requires explicit
package name ...
Ah, yes, of course.
> But in principle it works this way.
> Robins solution also does the right thing.
>
> Thanks for the hints.
>
> Since my original syntax looks so intuitive (at
least
> to me , can I
have it as a feature request?
Well, given that open() is one of the very few built-ins
that modify
its argument (with sysopen() -- any others?), and that the
"open my"
idiom is common, I think that could be allowed as some more
example of
DWIMmery. Provided it also works when CORE::open is
overriden.
|