Jon Ericson wrote:
>
> You misunderstand. I want to write this:
>
> open my $file, '/path/to/file' or die "can't open $file: $!";
> # code passes
> # /path/to/file is removed by another process
> # dang! what file did I open?
> print "I opened $file\n"; # ahh! that was it
As cool as this may be, it also inhibits us from using alternative
'to_string' operations on filehandles, including bytes read, position,
type (socket/pipe/file), etc. I'd rather see a more OO approach where
you'd have to do $file->{name}.
Hildo
- Re: Treating filehandles like strings Jon Ericson
- Re: Treating filehandles like strings Nathan Wiger
- Re: Treating filehandles like strings Bart Lateur
- Re: Treating filehandles like strings Jonathan Scott Duff
- Re: Treating filehandles like strings Jon Ericson
- Re: Treating filehandles like strings Hildo Biersma
- Re: Treating filehandles like st... Jon Ericson
- Re: Treating filehandles like strings Piers Cawley
- Re: Treating filehandles like strings Bart Lateur
- Re: Treating filehandles like strings Bennett Todd
- Re: Treating filehandles like strings Bart Lateur
- Re: Treating filehandles like strings Jonathan Scott Duff
- Re: Treating filehandles like st... Bart Lateur
- Re: Treating filehandles lik... Jonathan Scott Duff
- Fw: Treating filehandles like strings Michael Mathews
