#### define the structure Win32::API::Struct->typedef( POINT => qw{ LONG x; LONG y; }); #### import an API that uses this structure my $getCursor = new Win32::API('user32', 'GetCursorPos','S','N'); #### create a 'POINT' object my $pt = Win32::API::Struct->new('POINT'); #### call the function passing our structure object $getCursor->Call($pt); #### and now, access its members my ($x, $y) =($pt->{x}, $pt->{y}); print "The cursor is at: $x, $y\n";