#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    0
    Rep Power
    0
    I am a newbie to programing in PERL. I have used tons of PERL progs. But I am new to actually writing...

    My question is can you call another perl/cgi script from within another seperate script. The script I am creating when arange and prepare parameters for the script I want to call. Any help is appreciated.
  2. #2
  3. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    Yes.

    If the other perl script is on the same server, simply do something like this:

    #!/usr/local/bin/perl

    $output = system("perl /full/path/to/other/script.pl");

    print "Content-type: text/htmlnn";
    print "$output";

    If it's on another server somewhere, start here -> http://www.devshed.com/Talk/Forums/F...ML/000387.html
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Aug 2000
    Location
    Indiana
    Posts
    614
    Rep Power
    16
    I've not tried it, but I thought the system() method didn't return anything to a variable. I know that this would:
    $variable=`perl /path/to/script.pl`;

IMN logo majestic logo threadwatch logo seochat tools logo