develooper Front page | perl.perl6.internals | Postings from July 2002

[netlabs #801] [PATCH] PerlArray in scalar context

Thread Next
Sean O'Rourke
July 11, 2002 22:54
[netlabs #801] [PATCH] PerlArray in scalar context
Message ID:
# New Ticket Created by  "Sean O'Rourke" 
# Please include the string:  [netlabs #801]
# in the subject line of all future correspondence about this issue. 
# <URL: >

This patch makes the following behave as it does in Perl 5:

@a = 1..3; @b = 1..3;
$x = @a + @b;		# x is 6 in Perl 5, undef in Parrot

The problem was that the math vtable methods were giving up if the other
side of the operator wasn't an int or a num.  So the current version of
PerlArray would make $x undef.  I'm not sure getting the other thing's int
value (as opposed to its num value) is the right thing, but it seems like
a reasonable guess.


-- attachment  1 ------------------------------------------------------

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About