Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Call perl script from within another perl script

by jethro (Monsignor)
on Sep 12, 2008 at 01:52 UTC ( #710781=note: print w/ replies, xml ) Need Help??

in reply to Call perl script from within another perl script

system() needs file system paths, not urls. If your cgi-bin directory is really at /var/www/cgi-bin (for example), then you have to use that path to call the script.

apache might also have problems finding the perl interpreter. You might use the complete path to perl to find out whether that is the problem

Comment on Re: Call perl script from within another perl script
Replies are listed 'Best First'.
Re^2: Call perl script from within another perl script
by huklberry (Novice) on Sep 12, 2008 at 02:48 UTC
    I tried this as well with no luck....

    system("/usr/bin/perl /cgi-bin/");

      I think you missed what jethro was saying. /cgi-bin/ is very unlikely to be a file path to the executable. It implies (though guarantees nothing) that / is your webroot. When you're on the command line, where is That's what you're after. You should also be checking the system return and using the multi-arg call. See perldoc -f system or search in here for more. is in the /cgi-bin directory. That's where all my perl scripts are located.

        [localhost cgi-bin]# pwd
        [localhost cgi-bin]# ll
        -rwxr-xr-x 1 root root 191 2008-09-11 21:14

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://710781]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2015-07-08 03:28 GMT
Find Nodes?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...

    Results (94 votes), past polls