alexanderp98 has asked for the wisdom of the Perl Monks concerning the following question:
I'm having problems returning from a batch file called by the system command. The batch file completes but never returns to the calling perl script. What am I missing here? Here's a snippet of my code:
newbug.bat:
@echo off echo this is some message echo another message echo yet another message goto fini :fini echo "Exiting..." exit /b
fascanner.pl:
... $Jira_command_line="newbug $Jira_bug_category $Jira_bug_number trunk $ +TRUNK $sernum"; print "Calling '$Jira_command_line'\n"; #$i = system("$Jira_command_line"); ### original line but doesn't wor +k $i = system("cmd /c $Jira_command_line"); ### this also doesn't work print "\n********** Initial FA of $sernum complete! **********\n";
I noticed that "Exiting..." is displayed so it should be exiting, but somewhere hangs between leaving the batch file and returning to my perl script. Any ideas why? Thanks for your help.
I'm running ActivePerl 5.12 on Win XP and I've also tried ActivePerl 5.14, but still have the same issue.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Not returning from batch file
by ikegami (Patriarch) on Aug 17, 2011 at 18:36 UTC | |
by alexanderp98 (Novice) on Aug 17, 2011 at 18:39 UTC | |
by ikegami (Patriarch) on Aug 17, 2011 at 18:43 UTC | |
|
Re: Not returning from batch file
by Gulliver (Monk) on Aug 17, 2011 at 20:03 UTC | |
by ikegami (Patriarch) on Aug 17, 2011 at 21:47 UTC | |
|
Re: Not returning from batch file
by RichardK (Parson) on Aug 18, 2011 at 11:32 UTC |