I agree, this sort of thing is probably a path issue. You should put an "or die" or "or warn" conditional after your system call and have it report the OS error. I believe the variable is $! for the system error. Might help if you run with the -w switch, and I have recently gotten a lot of usage out of the "use diagnostics;" pragma in conjunction with -w. I would bet you a doughnut that you will get a "file not found" if you add those items.
Rather than alter the path in the prog to be absolute, I hear it is good scripting to use relative paths (I am almost always root and happily ignore that advice). Make sure the user you are telnetting in as has a.out in its $PATH; perhaps its home dir is not where you think it is, as well? -=GLA=- -----Original Message----- From: walter [mailto:walter]On Behalf Of walter valenti Sent: Wednesday, October 31, 2001 4:35 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: Order of operations! ..... Could be a problem of path of a.out (Why you use kill -9 ? You can use a normal TERM signal, with kill $pid) Walter > Below is some perl code which works fine when executed locally, however when > I telnet to the system it is on and and it is run things are not run in the > correct order. In fact it skips the first system call all together. > > Any suggestions on how to fix this? > > #!/usr/bin/perl > > $pid = getppid; > print "PPID is $pid"; > > $run = "./a.out"; > system($run); > > sleep 2; > $run = "kill -9 $pid"; > > system($run); > > It totally skips a.out. What it is meant to do is run a.out and then close > the telnet session using the kill. Locally it works fine(ie. not telneting). > When telneting it just kills without running a.out. > All help appreciated, > > Matthew > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]