Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^3: Call perl script from within another perl script

by Your Mother (Chancellor)
on Sep 12, 2008 at 02:55 UTC ( #710785=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Call perl script from within another perl script
in thread Call perl script from within another perl script

I think you missed what jethro was saying. /cgi-bin/test1.pl 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 test1.pl? 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.


Comment on Re^3: Call perl script from within another perl script
Select or Download Code
Re^4: Call perl script from within another perl script
by huklberry (Novice) on Sep 12, 2008 at 03:55 UTC
    test1.pl is in the /cgi-bin directory. That's where all my perl scripts are located.

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

      I'll be darned. Well, again, try checking the return value of the system call; or throw in a couple print "blah, blah" unless -e '/cgi-bin/test1.pl'; print "blah, blah" unless -x _; debug statements.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2015-07-05 14:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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









    Results (67 votes), past polls