0

I tried to open browser with different ways something like this

system('start ' . $url) or use special module Browser::Open He opened url , but not all , only http://host.com/cgi-bin/nagios3/status.cgi?hostgroup=all

I forgot to notice , i need to open http://host.com/cgi-bin/nagios3/status.cgi?hostgroup=all&style=detail&servicestatustypes=28&sorttype=2&sortoption=3

Dima Candu
  • 25
  • 1
  • 6

2 Answers2

2

& has special meaning for the shell, so you need to place the URL in quotes.

But start has a very unusual syntax. If the first argument is in quotes, it's taken to be the title of the Window. So you need to add a dummy first argument. The solution follows:

system(qq{start "" "$url"})
ikegami
  • 367,544
  • 15
  • 269
  • 518
0

As per system:

use strict;
use warnings;

my $url ="http://host.com/cgi-bin/nagios3/status.cgi?hostgroup=all";
system('start', $url);

Screenshot for the code above running:

enter image description here

Dr.Avalanche
  • 1,944
  • 2
  • 28
  • 37
  • @DimaCandu are you sure? It works, screenshot added. Maybe you have to explain what is not working. – Dr.Avalanche Oct 30 '15 at 13:13
  • i need to open this url http://host.com/cgi-bin/nagios3/status.cgi?hostgroup=all&style=detail&servicestatustypes=28&sorttype=2&sortoption=3 – Dima Candu Oct 30 '15 at 13:14