If you would like to make a call to, or reference, a Perl script from within a different Perl script, you can accomplish this a system(), exec() or the backtick operator to the path for Perl. For example:
system("/usr/bin/perl /path/to/my_script.pl ");
Or store output to array:
@myarray = `/usr/bin/perl mysecondperlscript.pl`;
So maybe an AI Perlmind — an artificial intelligence written in Perl — could rewrite its own code with improvements and enhancements, then call the new version of itself by the methods described in this weblog.
How do i call a “.cmd” from a perl script
If i’m not mistaken you mean batch file under NT/XP use system command
system(“c:\path\to\my.cmdâ€Â);
use system command.
ex: calling_script.pl
/usr/bin/perl -w
printf(“%s\n”,”this is calling script”);
system(“/myhome/caller_script.pl”);
exit;
Hi, I am calling 1.pl from main.pl file.
using
#main.pl
system (“perl 1.pl”);
In this case it works fine. But when I am doing
#main.pl
system (“perl 1.pl”);
system (“perl 2.pl”);
then it doesn’t executes “1.pl” properly.
So I would like to know, is there any constraint for this? Do I need to take any precautions for this?
Thanks,
actually i want the CVS tool in Perl ,i want write one programthat is Add which are we used in CVS ,so how i could write that program in perl
How can I call a sister perl script inside a perl script using Expect.pm. When the perl expect ends the script exits never executing the other script even though my last line in the script is
@myarray=`/usr/bin/perl /myscript.pl`;
print $myarray;
how do i run perl script in window xp or in dos
in one program i am using system command in that i called another program it is in some other drive how can i fix ths problem
Hi,
I want to write into file by calling another perl/cgi script.
sample1.cgi
from sample1.cgi I m trying to call sample2.pl
sample2.pl
When I m executing sample2.pl this works fine, This is able to write a word “AVATAR” into file but when I m using sampe1.cgi I doesn’t work as same.
That made my morning…:)…Thanks!
Hey,
How do I add a target to a Makefile in a certain directory in order to run a ‘Make all’ from a perl script?
Thanks!