C Code: ------- dSP; ENTER; SAVETMPS; PUSHMARK(SP); XPUSHs(sv_2mortal(newSViv((unsigned int)cbCtx))); for ( int i = 0; i < PACKET_SIZE; i++ ) { XPUSHs(sv_2mortal(newSViv((unsigned int)packet[i]))); } PUTBACK; call_pv( perlCbFuncName, G_SCALAR ); retVal = POPi; SPAGAIN; PUTBACK; FREETMPS; LEAVE; PERL Sample Code (prints the input params): ------------------------------------------- sub test_perl_cb { my ( $ctx, @arrRespParams ) = @_; printf ( "Context: 0x%X\n", $ctx ); foreach $item ( @arrRespParams ) { printf ( "0x%X\n", $item ); } return 1; }