use Config; $libdir = $ENV{PERL_SRC} || "$Config{installarchlib}/CORE"; if (!grep(/^-[cS]$/, @ARGV)) { $linkargs = sprintf("%s -L$libdir -lperl %s", @Config{qw(ldflags libs)}); } $cccmd = "$Config{cc} $Config{ccflags} -I$libdir @ARGV $linkargs"; print "$cccmd\n"; exec $cccmd;