Re: Treating filehandles like strings
[email protected] (Jonathan Scott Duff) Tue, 8 Aug 2000 16:32:26 -0500
| Newsgroups | perl.perl6.language.io |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Aug 08, 2000 at 10:51:25PM +0200, Bart Lateur wrote:
> On Tue, 8 Aug 2000 15:12:27 -0400, Bennett Todd wrote:
> >and I'll breathe a big sigh of relief when I
> >can just add "use Fatal qw(:all);" to the top of all my perl scripts
> >and forever more ditch all the " or die ..." clauses.
>
> Yes! Yes yes yes! Let's get rid of "open ... or die"!
I sincerely hope you really mean "Let's make ``open() or die''
optional" Exceptions should be integrated into the language but Ye
Olde "returns undef on error" should still be available as well.
try { $fh = open("foo") } catch { die "Oops" } # pick your syntax
$fh = open("foo") or die "Oops";
I'd expect either to work.
-Scott
--
Jonathan Scott Duff
[email protected]