lostcause has asked for the wisdom of the Perl Monks concerning the following question:
I have been slaving away at a few Perl/TK applications that are about ready
to be released to the big wide world. I have developed the code to be as OS
independent as possible and am trying to clear up a few last points. On the
"About" window of the app's there is a button that opens an url in
the users preferred web browser.
The code below illustrates the windows method I'm using:
#!/usr/bin/perl -w <br> use strict; <br> my $url = "http://www.perlmonks.org/"; <br> use Win32::FileOp qw(ShellExecute); <br> my $rc = ShellExecute("open", $url);
The user documentation with graphics is a pdf file which is also opened the same way.
Does anyone know
1. An OS independent way of opening an url or file from a Perl/TK application
that won't lock the original application or
2. A method suitable for MacOSX, Linux, Sun OS's?
This is probably trivial to anyone with U*NIX skills and I'm sure someone has done this before. Any help appreciated.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Opening a url from a Perl/TK app in UNIX
by PodMaster (Abbot) on Oct 24, 2003 at 15:06 UTC |