Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there any equivalent in windows for system("perl program.pl");

Status
Not open for further replies.

mylvaga

Programmer
Aug 27, 2001
5
CA
Instead of having change the directory always for this c:\perl\bin\perl program.pl, how do i write a search function in perl to do that search itself and run..

if($num == 1)
{
# change the path here
# system("perl extract.pl");
system("c:\\perl\\bin\\perl program1.pl");
}
elsif ($num == 2)
{
# change the path here
system("c:\\perl\\bin\\perl program2.pl");
}

Help me out..

 
I don't understand what do you want exactly, but you can put perl.exe in your c:\windows\ or anywhere in a directory that is define in PATH variable.

Then you'll don't need to specifiy the directory for using perl.

I hope it help you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top