
Cupidvogel
Novice
Mar 26, 2012, 2:11 PM
Post #3 of 8
(966 views)
|
|
Re: [BillKSmith] Anomaly with Perl Prototypes
[In reply to]
|
Can't Post
|
|
No no, I know fully well that I am adding two arrays inside the subroutine, which, because both arrays have length of 2 each will yield 4. (In fact that is a dummy statement to return something. I might as well use return 456!) And as for the removal of (3,4), that's the point, the code ought to store the array (4,3,4) in @d, 4 from the subroutine (which returns the result of the array addition, and because $$ is mentioned as prototype, the subroutine should consider only the parameters 1 and 2 from the list (1,2,3,4) to be considered into its arguments list) and (3,4) from the remaining values, resulting in @d having a value of (4,3,4).
|