use Win32::API; sub expo { my $function = Win32::API->new( 'power.exe, 'int foo()', ); $return = $function->Call(); print "foo returned $return\n"; my ($a, $b) = @_; return $a ** $b; }