Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^3: Opening URL in instrumented browser

by Arunbear (Prior)
on Sep 18, 2013 at 10:18 UTC ( [id://1054631]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Opening URL in instrumented browser
in thread Opening URL in instrumented browser

Yes, it is a blocking call:
% perl -E 'system(q[opera http://www.perlmonks.org/]); say "hello!" ' + hello!
That only prints "hello!" once Opera exists. Non-blocking alternatives are:
% perl -E 'system(q[opera http://www.perlmonks.org/ &]); say "hello!" +' hello!
i.e. launching in the background, or
% perl -E '$r = fork; if($r == 0) { exec(q[opera http://www.perlmonks. +org/]) } elsif(defined $r) { say "hello!" }' hello!
which forks off a child process, and uses exec (so the child process doesn't hang around waiting for the browser process to end).

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1054631]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2024-04-19 20:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found