Hi, >system "ssh [EMAIL PROTECTED] \"open FILE, /home/cgadgil/AVMInstall.log\"
This will not open a file on remote host. Since you call the external ssh command, all arguments given to this command will be in shell statement, not in Perl syntax. "open FILE, /home/cgadgil/AVMInstall.log" is a Perl open, shell can't understand for this at all. > Message du 28/08/08 15:29 > De : "Irfan J Sayed (isayed)" > A : "Jeff Pang" , beginners@perl.org > Copie à : > Objet : RE: perl script on remote server linux > > > > Hi All, > > Now what I need to do is, on remote server I need to open a file and parse > that file for errors. > To do this I did in following way (part of perl code). > > sub conn() > { > system "ssh [EMAIL PROTECTED] \"open FILE, /home/cgadgil/AVMInstall.log\" or > die $!;"; > if ($?){ print "connection failed\n";} else{ print "connection > successful\n";} > } > > But I am getting error as follows. > Couldnt get a file descriptor referring to the console > connection failed > > Please suggest. > > Regards > Irfan. > > > > -----Original Message----- > From: Jeff Pang [mailto:[EMAIL PROTECTED] > Sent: Wednesday, August 27, 2008 2:32 PM > To: Irfan J Sayed (isayed) > Cc: beginners@perl.org > Subject: RE: perl script on remote server linux > > > system "ssh [EMAIL PROTECTED] /home/cgadgil/avm2.1/launchtomcat.sh"; > > you need a "\" before the "@". > modify it to: > > system "ssh [EMAIL PROTECTED] /home/cgadgil/avm2.1/launchtomcat.sh"; > > Créez votre adresse électronique [EMAIL PROTECTED] > 1 Go d'espace de stockage, anti-spam et anti-virus intégrés. > > Regards, Jeff. Créez votre adresse électronique [EMAIL PROTECTED] 1 Go d'espace de stockage, anti-spam et anti-virus intégrés.