in reply to Re: Passing a pointer to a .NET DLL
in thread Passing a pointer to a .NET DLL

If the OP had added

use warnings; use strict;

then Perl would have pointed this out. Good catch.

Suggested reading for the OP, Use strict and warnings and 'use strict' is not Perl.