"be consistent" | |
PerlMonks |
Re: composite pattern, best practice, pushing into an array in a hash, reusing the get array methodby vladb (Vicar) |
on Feb 13, 2006 at 21:23 UTC ( [id://529936]=note: print w/replies, xml ) | Need Help?? |
To reuse getCreditAccounts(), you'd have to first rewrite the method to return array ref, and not a copy of the array you are attempting to ultimately change.
From there, you could possibly do something like
_____________________ "We've all heard that a million monkeys banging on a million typewriters will eventually reproduce the entire works of Shakespeare. Now, thanks to the Internet, we know this is not true." Robert Wilensky, University of California
In Section
Seekers of Perl Wisdom
|
|