Haven't yet had a chance to take a thorough look at this. I inserted the following near the beginning of your script: use Inline C => Config => BUILD_NOISY => 1; That way you get to see any compiler warnings that are emitted during the C compilation, and with my cc-4.5.2 build of perl-5.14 I saw: try_pl_f4a3.xs: In function 'get_proc_name': try_pl_f4a3.xs:35:1: warning: function returns address of local variable try_pl_f4a3.xs: In function 'process_list': try_pl_f4a3.xs:57:5: warning: passing argument 2 of 'Perl_newRV' from incompatible pointer type C:\MinGW\perl\lib\CORE/proto.h:2567:19: note: expected 'struct SV * const' but argument is of type 'struct AV *' Whether there's anything relevant there, I don't know. I get different output to you, of course. But in the middle of the output I also got one odd-looking line: 1348┤aæ☻↑:ñ $ ↑:ñ ~↑☻ When I switched to a gcc-3.4.5 build of perl-5.12, I found out what 1348 really was: 1348TomTomHOMERunner.exe But then I got a strange line at the beginning of the output: 4ð¬─w4§Å ↑ whereas, with gcc-4.5.2, that had been: 4