http://www.perlmonks.org?node_id=82453


in reply to Win32::API

Reference the Win32::API docs. To use a pointer in a Win32 API call, simply pass in an ordinary perl scalar (not a reference, just a scalar). Note however, that you must make sure the scalar is big enough to hold the results. e.g. if the Win32 API call is expecting a pointer to a string and you know the call will put at most 80 chars in the string, initialize the string (perl scalar) like so:
$buffer = " " x 80;
See this writeup on SystemParametersInfo or this one on GetShortPathName for an example of Win32 API calls that take a pointer.