Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^3: Perl TK

by marto (Chancellor)
on Sep 24, 2012 at 14:23 UTC ( #995396=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Perl TK
in thread Perl TK

Well, you could install firefox or use a sensible method to launch the default browser with the URL. For Windows:

start http://www.perlmonks.org

For Linux:

xdg-open http://www.perlmonks.org

And so on.


Comment on Re^3: Perl TK
Select or Download Code
Re^4: Perl TK
by randor (Novice) on Sep 24, 2012 at 15:20 UTC
    Yes, Thank you.. not very smart on my part, after I posted I realized that I did not have firefox installed on this system.

    I did get it to open a page, however, it caused a new problem.

    It opens a browser window but then I get an error saying "Perl command line interpreter has stopped working" and it closes out my program.

    below is the call that I make (please note that I set this code just to test it working so please bare with the hardcoding of the link and such)

    $tmp_label = $table->Button(-image => $D_Image, -borderwidth=>0, -cur +sor=>'hand1', -command=>[\&NewOrders]); sub NewOrders { $pid = fork(); if ($pid == 0) { execute(system "start http://www.yahoo.com"); exit(0) +;} }
    Anyone know why it is crashing out my perl? I believe I have it forked properly??
      Anyone know why it is crashing out my perl? I believe I have it forked properly??

      Why do you have exit(0) in the forked code? My guess is that exit is closing the script. Maybe it has something to do with fork being emulated by threads on MSWindows? See How does system(1,"foo") work on Windows?. Maybe all you need is "system(1, start $url)"

      if ($pid == 0) { execute(system "start http://www.yahoo.com"); exit(0)

      I'm not really a human, but I play one on earth.
      Old Perl Programmer Haiku ................... flash japh
        Yeap, that worked.. Thank you.

        I added exit(1) because with fork I did not want any zombie children running around creating havoc on my memory and CPU.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (11)
As of 2014-07-29 19:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (226 votes), past polls