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; } #### C:\_32\pscrpt\embed>power Can't load module Win32::API, dynamic loading not available in this perl. (You may need to build a new perl executable which either supports dynamic loading or has the Win32::API module statically linked into it.) at power.pl line 1 Compilation failed in require at power.pl line 1. BEGIN failed--compilation aborted at power.pl line 1. Undefined subroutine &main::expo called at power.pl line 1.