develooper Front page | perl.perl6.language.data | Postings from September 2000

Re: RFC 237 (v1) hashes should interpolate in double-quoted strings

Thread Previous | Thread Next
From:
Michael G Schwern
Date:
September 15, 2000 22:09
Subject:
Re: RFC 237 (v1) hashes should interpolate in double-quoted strings
Message ID:
20000916010925.G8573@athens.aocn.com
On Sat, Sep 16, 2000 at 03:37:33AM -0000, Perl6 RFC Librarian wrote:
> "%hash" should expand to:
> 
>   join( $/, map { qq($_$"$hash{$_}) } keys %hash )

So let me get this straight...

   %hash = (foo => 42, bar => 13);
   print "%hash";

should come out to:

   foo 42
   bar 13

The idea of interpolating a hash is cool... but is seperating each
pair by $/ really useful?  A comma or $" sees to make more sense.

Could you show some examples of practical usage?


-- 

Michael G Schwern      http://www.pobox.com/~schwern/      schwern@pobox.com
Just Another Stupid Consultant                      Perl6 Kwalitee Ashuranse
Plus I remember being impressed with Ada because you could write an
infinite loop without a faked up condition.  The idea being that in Ada
the typical infinite loop would be normally be terminated by detonation.
        -- Larry Wall in <199911192212.OAA23621@kiev.wall.org>

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About