On Tue, Jul 27, 2004 at 05:39:08AM +0000, [EMAIL PROTECTED] wrote:
> Don't know if I'm just too tired to see the forest for the trees,
> or if my Perl skills need more work in this area (probably both)...
>
> I'm trying to pass an array between plugins. The sending plugin
> does this:
>
> $transaction->notes( 'myarray', @array ) ;
>
> The receiving plugin does this:
>
> @array = $transaction->notes( 'myarray' ) ;
> foreach $element ( @array ) {
> #whatever
> }
>
> The sending plugin sets several elements in the array, which I
> have verified are actually done, but the receiving plugin only finds the
> first element. Can someone please explain why and/or suggest a fix?
Probably because the $transaction->notes method only takes two arguments,
and is thus only getting the first element of the array. In that case
you should pass a reference to the array instead.
Hope that helps,
Andrew
--
mailto:[EMAIL PROTECTED] Andrew Pam
http://www.xanadu.com.au/ Chief Scientist, Xanadu
http://www.glasswings.com.au/ Technology Manager, Glass Wings
http://www.sericyb.com.au/ Manager, Serious Cybernetics