Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open web page with perl script

Status
Not open for further replies.

EfratS

MIS
Aug 4, 2004
15
CA
Hello,
Does someone knows how can I simply run URL throw my perl code?

To be more specific:
I want that the last row in perl script will open the web page, and then the script should be terminated.

thanks.
 
Couple of ways:

Code:
print redirect("[URL unfurl="true"]http://www.yoursite.com");[/URL]

or

Code:
<html><head><meta http-equiv=\"refresh\" content=\"0; URL=http://www.yoursite.com\"></head><body></body></html>

Can't tell you why but the first one doesn't always work on all servers.

There's always a better way. The fun is trying to find it!
 
When I'm trying to run your first suggestion, the following error message appears:
"Undefined subroutine &main::redirect called"
Do I need to insert any "use" ?

Thanks!
 
use CGI;
i believe
--Paul

It's important in life to always strike a happy medium, so if you see someone with a crystal ball, and a smile on their face ...
 
#/usr/bin/perl

use OLE;

$ie = CreateObject OLE "InternetExplorer.Application.1" ||
die "CreateObject: $!";
$ie->{Visible} = 1;
$ie->Navigate("
# Other mode:
use Win32::OLE;
Win32::OLE::CreateObject("InternetExplorer.Application.1", $ie) || die "CreateObject: $!";
$ie->{Visible} = 1;
$ie->Navigate("
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top