http://qs1969.pair.com?node_id=681424


in reply to Re: Trouble with Win32::GUI app spawning child processes
in thread Trouble with Win32::GUI app spawning child processes

Many Thanks BrowserUk

I went for the second option, which opens a new instance of IE for me, rather than the first one, which took over existing IE windows that were running (I think you got your descriptions the wrong way around.)

I still need to find out what the difference is here though. I thought system and backticks differed only capturing output. I don't really understand why these calls don't block.

PS Sorry for the delayed reply

---
my name's not Keith, and I'm not reasonable.
  • Comment on Re^2: Trouble with Win32::GUI app spawning child processes

Replies are listed 'Best First'.
Re^3: Trouble with Win32::GUI app spawning child processes
by BrowserUk (Patriarch) on Apr 18, 2008 at 09:45 UTC

    Briefly

    1. system q[ start url ]; works because it uses the win32 start command.

      The nice thing abut this is that the start command will look up the current users preferred browser and start it with the url supplied. So, for you it may start IE, but the same command for me it would start Opera. For someone else it might start Firefox.

      For details type help start at a command window.

    2. start 1, ... works because under win32, Perl has a built-in extension that does an asynchronous spawn if the first parameter to system is the magic token '1'.

      I can't point you to the documentation because I found out about it right here at PM. Probably from tye.

      Possibly here, or here or here ...


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.