Ethen has asked for the wisdom of the Perl Monks concerning the following question:
When i run this, it throws error. Do i need to write like this:$Src_Cmd = "srvrmgr – g $GATEWAY –e $ENTERPRISE_SERVER –s $USER –p $PA +SSWD –c Run Task for comp $SYSTEM_NAME processName=\"UDA Batch Deplo +yment\", "RowId=$row_id"; #Subroutine to invoke the command sub Command_exe { ($COMMAND) = @_; print "Command to execute=$COMMAND\n"; $ret = system($COMMAND); if($ret == 0) { print "command executed successfully\n"; return 0; } else { print "Command Failed\n";return 1; } return 0; } #main------- $ret = Command_exe("$Src_Cmd"); # invoke the command line. print "ret code=$ret\n";
Please suggest how to use the command? Cheers!! Ethen$Src_Cmd = "srvrmgr","– g","$GATEWAY","–e","$ENTERPRISE_SERVER","–s"," +$USER","–p","$PASSWD","–c",Run Task for comp $SYSTEM_NAME processName +=\"UDA Batch Deployment\", "RowId=$row_id";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to run a command from Perl
by Corion (Patriarch) on Jan 18, 2008 at 09:24 UTC | |
|
Re: How to run a command from Perl
by ysth (Canon) on Jan 18, 2008 at 09:21 UTC | |
by Anonymous Monk on Jan 18, 2008 at 09:53 UTC | |
by moritz (Cardinal) on Jan 18, 2008 at 10:18 UTC | |
by hipowls (Curate) on Jan 18, 2008 at 10:18 UTC | |
|
Re: How to run a command from Perl
by zentara (Cardinal) on Jan 18, 2008 at 14:35 UTC |