use strict; use warnings; use v5.10; use Win32::API; use Win32::API::Struct; use Data::Dumper; Win32::API->Import("$Dll", 'LONG AdsGetDllVersion()') or die "$!"; $LONG = AdsGetDllVersion() or die "AdsGetDllVersion failed: $^E"; @{$Data}{qw (version reversion build)} = unpack "CCS", pack "l", $LONG; print Dumper ($Data);