in reply to Re: Re(3): Running a C Program within Perl.
in thread Running a C Program within Perl.

My mistake. Whereas Korn shell (ksh) supports the syntax you are using:

export ENVVAR=value

Bourne shell (sh) doesn't, instead preferring:

ENVVAR=value; export ENVVAR

Perl is undoubtably running the command using the default Bourne shell (sh). Try specifying Korn shell in your shebang (you may have to modify the path depending upon where ksh is located on your system):

#!/bin/ksh

dmm