CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
Perl Not ableto run system command of network.

 



anjaliaglawe
New User

Feb 10, 2011, 1:18 PM

Post #1 of 2 (525 views)
Perl Not ableto run system command of network. Can't Post

Hello all,

I am trying to generate a keyring file from eclipse utility.
I am able to generate the same one through command prompt by using this command imutilsc saveCredential -url htttps:/urltoconnect -userName username -userPassword password -keyring /tmp/keyring but when i run the same thr perl script it gives me error:

Cannot connect to the URL.
- Verify that the URL is correct.
- Verify that the user name and password are correct.
- Verify that you can access the network.

my perl code:
$cmd = "imutilsc saveCredential -url htttps:/urltoconnect -userName username -userPassword password -keyring /tmp/keyring";

chdir('/opt/ibm/InstallationManager/eclipse/tools') or die $!;
exec "$cmd" or die $!;


please help me..


budman
User

Feb 10, 2011, 8:26 PM

Post #2 of 2 (517 views)
Re: [anjaliaglawe] Perl Not ableto run system command of network. [In reply to] Can't Post


In Reply To

my perl code:
$cmd = "imutilsc saveCredential -url htttps:/urltoconnect -userName username -userPassword password -keyring /tmp/keyring";

chdir('/opt/ibm/InstallationManager/eclipse/tools') or die $!;
exec "$cmd" or die $!;


Url's contain two slashes:
htttps://urltoconnect

Secondly, do you want the system call to return to the perl script?
If so, use system($cmd) instead of exec - exec runs the cmd and never returns to the script.

perldoc -f exec
perldoc -f system

hope that helps
Rich

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives