use strict; use warnings; use Browser::Open qw( open_browser ); my $url = 'https://www.google.com/search?q=finance;source=lnms;tbm=isch'; my $ok = open_browser($url); printf "\$ok = >%s<: %s\n", $ok, !defined($ok) ? 'no recognised command found' : $ok == 0 ? 'command found and executed' : 'command found, error while executing';