# program main.pl require "testprog.pl"; @data = add1( 100, 1000, 10000); # program testprog.pl sub add1($,$,$) { my ($a, $b, $c) = @_; $a++ ; $b++ ; $c++; return ($a, $b, $c) } when you run main.pl, you got @data = (101, 1001, 10001) have a nice day =) ----- Original Message ----- From: "Hubert Ian M. Tabug" <htabug@mydestiny.net> To: "Perl" <beginners@perl.org> Sent: Friday, January 04, 2002 2:15 PM Subject: Calling a perl script with a perl script Hi, Given that I have a perl script main.pl, and I want main.pl to "use/call" the script testprog.pl, and store testprog.pl's output into a variable that can be used within main.pl. How do I go about doing it? Your help would be greatly appreciated. Thanks, HubertThread Previous | Thread Next