I seem to remember windows' start command is a console app, so if you're running in a GUI it has to spawn a console to run start. start itself then spawns an external program and quits, hence the flash of a console window.
If you can always be sure that the browser will be IE, then you can use:
system( "iexplore.exe http://myurl.com" );
Failing that, you should be able to lookup in the registry the default association of .html files. I think it's this:
[HKEY_CLASSES_ROOT\htmlfile\shell\open\command]
Otherwise, have a play with Regmon and see what keys are being queried when the default browser is started. You can then query the same keys in Perl and invoke that browser directly.
Update: Ah, jasonk has a much more simpler solution. But it's much more fun to have an purely Perl approach ;)
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.