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

Syatem and exec

Status
Not open for further replies.

FN

Programmer
Aug 7, 2002
4
AU
Hi.
I am trying to open up an url in Netscape from my perl script.
I can use
system("netscape 'But the code do not countiue after netscape has open up the url.

If I open it up with this code (without the quotes) it will
continue after the execution.
system("netscape
My problem is:
What do I need to do to make the script to continue after this code
system("netscape '
Thanks in advance
 
hi FN (again) :)

I don't know whether the script will continue (i think so)
but try using:
Code:
use CGI qw(:standard);
print redirect('[URL unfurl="true"]http://www.something.com');[/URL]

Hope this helps to :-D

math
 
The system function waits for the OS command to finish before it continues with the rest of the code. So, the way you have it written, it would open and browser and wait for you to close the browser before it continued. If you want the program to keep running after the browser is opened and while the browser is open, then you will need start the browser via a fork. A fork will start a new process and allow your original program to keep on motoring.


HTH


keep the rudder amid ship and beware the odd typo
 
if(fork()){
# carry on and do something.....
} else {
system("netscape ' exit 0;
} Mike
michael.j.lacey@ntlworld.com
Email welcome if you're in a hurry or something -- but post in tek-tips as well please, and I will post my reply here as well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top