Ha, Ok well that was interesting. I ran this script on a different machine and it works fine... Weird. So, nevermind :)
On Wednesday 13 February 2002 03:35 pm, you wrote: > I'm curious how you got this script to work, I re-wrote his with something > like this: > > my @hosts = ("1.com", "2.com", "3.com", "4.com"); > > foreach my $key (@hosts) { > system("ssh -l @ARGV[0] $key"); > } > > and it will SSH to 1.com ONLY. After the session with 1.com is ended, it > doesn't continue on to 2.com, or 3.com, etc. What's wrong here? > > On Wednesday 13 February 2002 03:21 pm, you wrote: > > I was actually surprised to see that ssh worked like this! I don't > > think you can always get away with it, but I just tested it out and was > > able to call up ssh for 4 different machines using a script similar to > > that one. I don't think all programs are going to be that nice. > > > > Can anyone explain how ssh got the keyboard input?! Doesn't perl have > > control of <STDIN> or does it pass that off to the spawned process > > during a call to 'system'? > > > > - Johnathan > > > > James Taylor wrote: > > >I don't believe this is what he's asking - What the problem is in this > > > code is that after the first instance of SSH runs, and then exits, it > > > will not continue on to the next key in the array. > > > > > >I can't figure out why it won't do it, I don't generally write programs > > > using system calls :) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]