in reply to External programs

I hope what you're really asking is I don't want my second Perl program to run in a new process and you just don't know it.

But, as cleen writes, you aren't being very clear.

This will help you if your question is what I think it is. (you can ignore the $\ assignments, that's me testing lazily :)

$\="\n"; print $$; if ( open PROG, '/home/userxyz/prog.pl' ) { undef $/; eval <PROG>; warn $@ if $@; close PROG or die $!; } print $$;
and PROG looks like this:
#!/usr/bin/perl -w use strict; $|++; $\="\n"; print $$;
If your question doen't involve the second program being Perl, then my example won't work... but I can't think of how to do it without starting a new process... I haven't had my coffee either.

Enjoy!

--
Casey