develooper Front page | perl.perl6.language | Postings from March 2005

[pugs] array interpolation question

Thread Next
From:
Garrett Rooney
Date:
March 5, 2005 08:22
Subject:
[pugs] array interpolation question
Message ID:
4229DCBF.4020009@electricjellyfish.net
It looks like the current pugs array interpolation doesn't quite match 
the description in S02.

S02 says that container references automatically dereference to the 
appropriate (white space separated) string values, which is fine, pugs 
does that now, but it also says that to interpolate an entire array you 
need to subscript with empty brackets, so if we've got an array @a = (1, 
2, 3) then "@a" eq '@a', but "@a[]" eq "1 2 3", at least from my reading 
of the synopsis.

So what's right, the spec or the implementation?

Assuming the spec is correct, here's a patch to add some more tests to 
t/op/string_interpolation.t.

-garrett

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