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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

System() in Windows

Status
Not open for further replies.

Sruti

Programmer
May 2, 2001
2
0
0
US
Hi,
I am working on Perl5. I have writtem a perl program that calls another perl program using the system() function. In the second perl program I want to write to a file using the open() function.

The second program works fine when called individually, but when the first program runs, the system function returns:
$?=0, but the second program does not get executed.

Can anyone help me with this.

The same set of programs run fine on Unix.
 
Is there some reason you're using the system function to call the other program instead of just using DO? I.e.:
Code:
do "program-name.pl";
That may alleviate your problem, and ought to be a little faster too, since you won't be starting another shell process to run the other program.
Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Hey Tracy,
Thanks a lot for your help
-- Sruti
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top