On Tue, 13 Jul 2004 [EMAIL PROTECTED] wrote:
> I have a wish for Perl 6. I would like if the open-funktion
> opens only a file if it doesn't exist.
> Of course, I can first test if the file exist.
I rather have a much "bigger" wish for an open-like operator that to be
fair I would like to see *also* in Perl5: nothing that one can do in well
more than one way in any case (also including creating a module that will
do exactly what I write below...), but that indeed would come handy
occasionally.
I'm thinking of an operator that returns a "magical" FH working like the
ARGV one (with authomatic error handling etc. - obviously under Perl6
the beahviour could be tunable by means of modifiers, etc.), e.g.
openmany my $fh, [list];
while (<$fh>) {
# ...
}
Michele
--
+++ wrote:
> Idiot.
top-poster
- Robin Chapman in sci.math,
"Re: This Week's Finds in Mathematical Physics (Week 204)"