use warnings; use strict; use IPC::Run3 'run3'; my $cmd = 'C:\Program Files\Mozilla Firefox\firefox.exe'; run3 [$cmd,'--version'], undef, \my $out or die "run3: $!"; die "\$?=$?" if $?; chomp $out;