Hong Zhang wrote:

> This code should NEVER work, period. People will just ask for trouble
> with this kind of code.

Actually I meant to have specified ">>" as the mode, i.e. append, then
what I originally said holds true.  This behaviour is predictable and
dependable in the current perl implementation.  Without the >> the file
will contain just "bar\n".

The point is that we have a stated goal of preserving the existing
semantics, and of allowing existing perl5 code to continue to work. 
Despite what some people seem to think this is *not* a clean slate
situation.  We may well have to deliberately carry over questionable but
depended-upon behaviour into perl6.

        my $fh = do { local *FH; *FH; }

for example, better continue to work.

Alan Burlison

Reply via email to