CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Intermediate: Re: [FishMonger] Link to Web Page: Edit Log


Apr 19, 2014, 10:02 AM

Views: 11493
Re: [FishMonger] Link to Web Page

I feel totally bad for even asking this question before I did a complete Google search. The answer is very simple! I’m working with Windows 7, not sure if this also works on UNIX, but the answer is:

my $commandline = qq{start "$Filename" "$Filename"};  
system($commandline) == 0 or die qq{Couldn't launch '$commandline': $!/$?};

The page I want to show is on my local disk and I just have to give the path to it.

The page displays as a new tab in my default browser and the program continues to run. I can easily have 3 buttons to create three reports, click on each button one after the other, and my browser will then have 3 tabs, one for each report. The Perl program does not wait for the web page / browser window to be closed before continuing.

Of course after asking such an easy question I should be talking about my "Pearl" program so everyone thinks I'm a total newbie!

The windows “start” function automatically looks up the .htm extension and opens the appropriate program to display it, in this case the default browser.

A quirk in windows requires that the filename/path be entered twice!

(This post was edited by PapaGeek on Apr 19, 2014, 10:09 AM)

Edit Log:
Post edited by PapaGeek (User) on Apr 19, 2014, 10:05 AM
Post edited by PapaGeek (User) on Apr 19, 2014, 10:09 AM

Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives