>>>>> "PRL" == Perl6 RFC Librarian <[EMAIL PROTECTED]> writes:
PRL> =head1 ABSTRACT
PRL> "%hash" should expand to:
PRL> join( $/, map { qq($_$"$hash{$_}) } keys %hash )
PRL> =head1 DESCRIPTION
PRL> Hashes do not interpolate in double-quote context in perl5. They
PRL> should, because (a) scalars and arrays do, (b) it is a useful
PRL> thing.
PRL> The big problem is that % is heavily used in double-quoted strings
PRL> with printf. I don't have a solution to this. In the end, this may
PRL> be B<the> definitive reason why hashes do not interpolate. And that's
PRL> fine by me.
What about formating the output as a value that can be used by eval?
%hash = (a => 1, b => 'the world');
print "%{hash}\n";
('a' => 1, 'b'=> 'the world')
And as for having to escape % in printf strings. Why not enable the
interpolation if the %{ is seen?
<chaim>
--
Chaim Frenkel Nonlinear Knowledge, Inc.
[EMAIL PROTECTED] +1-718-236-0183