in reply to Execution of external command hangs

Does anything in your app set $/?

Try adding the local line below:

sub returnVersion() { my $cmdToExecute = "dds_cmd -Version "; my $versionNum; my $PH; if (!open($PH, "$cmdToExecute 2>&1 |")) { print STDERR "Failed to execute command:($cmdToExecute)--$!\n"; exit 1; } local $/ = "\n"; ################### while (my $line = <$PH>) { if (index($line, "Command Execution ") != -1){ $line =~ s/^.+version\s|\.0.$//g; $versionNum = $line; } } close($PH); return $versionNum; }

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.