Re: Can overloaded '+' return an array? If so, how?
- From: "PeterSShenkin" <shenkin@xxxxxxxxx>
- Date: 31 Aug 2006 08:43:00 -0700
jl_post@xxxxxxxxxxx wrote:
I fiddled around with your test code, and I found that, while the
code:
my @ar = $ca1 + ca2;
is not called in list context, the following three functionally
equivalent lines:
my @ar = $ca1->combine($ca2);
my @ar = combine $ca1 $ca2;
my @ar = ClassAct::combine($ca1, $ca2);
do return an array as you want -- without the need to change the
combine() method.
I do find that both interesting and useful.
Thanks,
-P.
.
- References:
- Can overloaded '+' return an array? If so, how?
- From: PeterSShenkin
- Re: Can overloaded '+' return an array? If so, how?
- From: jl_post@xxxxxxxxxxx
- Can overloaded '+' return an array? If so, how?
- Prev by Date: Re: SNMP module to query net-snmp
- Next by Date: Re: Hi Guys !
- Previous by thread: Re: Can overloaded '+' return an array? If so, how?
- Next by thread: Net::SMTP problem
- Index(es):