Perl Script within another script

Hi all,

I am trying to write a perl script which will fetch domain names from a database table, and run a whois search on them.

I want to know how exactly run another script within perl. I tried looking for exec, system etc., but found too less info on those.

I am not sure how to run a system command with options (for eg, -d, -m) etc.

Can anyone help me on that? I want to run whois command on the fetched domain name, and output it to a text file.

Thank you.

What have you done so far?

system("perl -e blah.pl"); should return results, but it has to be stdout and then stdin has to be receiving the information from the secondary perl script.

If you have two per scripts combine them into one script.

I agree with KevinADC that the most practical solution would be to combine them. If for some reason you can't, perl understands command substitution quotes just like shell scripts do.