use Digest::MD5 qw(md5_hex);
...
my $fileMd5 = md5_hex($text) . $ext;
####
open(my $fh, ">", $fileMd5) or warn("Could not create ($fileMd5)\n"), next;
##
##
if(system(mozilla => -remote => 'ping()')) {
warn "mozilla not found!";
my $pid = fork;
die "Couldn't fork: $!" if not defined $pid;
exec { 'mozilla' } 'mozilla' if $pid == 0;
}
# and changing the command like so:
# (obviously, use "new-window" if you prefer that)
my $commandShow = q{mozilla -remote "openurl(%s, new-tab)"};
##
##
Win32::Process::Create(
my $process,
"mozilla.exe", # maybe needs absolute path, dunno
"",
0,
NORMAL_PRIORITY_CLASS,
"."
) || die ErrorReport() if system(mozilla => -remote => 'ping()');