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

Send data 2 netscape ?

Status
Not open for further replies.

FN

Programmer
Aug 7, 2002
4
AU
Hi again.
I have a problem with my perl script.
I want to send data to netscape and also continue the script.
It works fine so long as I just send simpe data like
system("netscape
but when I send the data like this

system("netscape
it just open netscape with and then stops.
If I want the script to move on I need to kill netscape a´nd
then it moves on.

It's like my perl process moves to netscape and then when I kill netscape it will move on again.

I hope someone know what to do about this.

Thanks in advance
/FN
 
sorry noone has helped you, but the thing you're talking about is happening against the assumed behavior for system, and system is usually looked at as a slightly mysterious function...
well, anyway, you can try doing it different ways first. try backticks (`) like this:[tt]
`netscape whatever`;[/tt]

and for variety, try opening a pipe:[tt]
open PIPE, "| netscape whatever" or die "Pipe failed: $!";[/tt]

however, if neither of these work (well, they're doing exactly the same thing), you could try doing a multi-threaded version:[tt]
use Thread;

my $netscape_thread = Thread->new(\&open_netscape);

sub open_netscape
{
system "netscape whatever";
}[/tt]

(wouldn't have thought of this were it not for the question asked a bit ago) that way, even if it does freeze perl, that'll be in a thread separate from your main running program...

if none of these work, it may be a bug somewhere between perl and netscape... "If you think you're too small to make a difference, try spending a night in a closed tent with a mosquito."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top