How to run cgi script

2008-09-01 Thread Irfan J Sayed (isayed)
Hi, I have installed IIS on my machine (to make my machine web server). Now i need to execute / run cgi script on my machine. cgi script is saved in c:\irfan. now how should i run this cgi script in web browser. which webURL i should give. Regards Irfan.

RE: perl script on remote server linux

2008-09-01 Thread Irfan J Sayed (isayed)
Hi, Please suggest. Regards, Irfan. From: Irfan J Sayed (isayed) Sent: Friday, August 29, 2008 1:09 PM To: '[EMAIL PROTECTED]'; Jeff Pang; beginners@perl.org Subject: RE: perl script on remote server linux Thanks. It worked but with one issue.

RE: perl script on remote server linux

2008-08-29 Thread Irfan J Sayed (isayed)
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, August 28, 2008 8:18 PM To: Irfan J Sayed (isayed) Cc: beginners@perl.org; Jeff Pang Subject: RE: perl script on remote server linux Try this: system "ssh -x -t SERVER_NAME \"sudo /home

RE: perl script on remote server linux

2008-08-28 Thread Irfan J Sayed (isayed)
Yes. I want to parse string "error" in the log file. Please suggest how should I achieve this. Regards Irfan. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, August 28, 2008 7:29 PM To: Irfan J Sayed (isayed) Cc: beginners@perl

RE: perl script on remote server linux

2008-08-28 Thread Irfan J Sayed (isayed)
TED] 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: sys

search value in array

2008-08-28 Thread Irfan J Sayed (isayed)
Hi All, I want to search whether specific value/data is there are not in Array. For example lets say i have array as follows. @test = (1,2,3,4,5); $rel1=4; I need to check whether 4 is there or not. I have one method as follows. if (grep /^$rel1$/, @test) { print "Result = $rel1\n"; }

RE: perl script on remote server linux

2008-08-27 Thread Irfan J Sayed (isayed)
Thanks Jeff. It really helped. Just one doubt, if we can perform operation with ssh then why we require Net::SSH module?? Regards Irf. -Original Message- From: Jeff Pang [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 27, 2008 2:32 PM To: Irfan J Sayed (isayed) Cc: beginners

RE: perl script on remote server linux

2008-08-27 Thread Irfan J Sayed (isayed)
Hi, In my case, the user with which I am executing the script is not there in sudoers file. So I did in the following manner. #!/usr/bin/perl open FILE, "server_list" or die $!; while() { print "the host is: $_"; chomp; system "ssh [EMAIL PROTECTED] /home/cgadgil/avm2.1/launchtomcat

NET ssh module

2008-08-26 Thread Irfan J Sayed (isayed)
Hi All, I am trying to install Net-ssh module. I am getting error like not able to access FTP site to fetch CPAN files. Please find the attached log. The box where i want to install this module does not have the internet connection. Please sugget. Regards Irf. [EMAIL PROTECTED] Net-SSH-Perl

RE: doubt in code

2008-08-21 Thread Irfan J Sayed (isayed)
Hi, Can somebody please help. Regards Irfan. -Original Message- From: Irfan J Sayed (isayed) Sent: Friday, August 22, 2008 11:12 AM To: 'Stewart Anderson'; beginners@perl.org Subject: RE: doubt in code Agree, but where is the file name?? $server will just store the server

RE: doubt in code

2008-08-21 Thread Irfan J Sayed (isayed)
> -Original Message- > From: Irfan J Sayed (isayed) [mailto:[EMAIL PROTECTED] > Sent: 21 August 2008 15:49 > To: beginners@perl.org > Subject: doubt in code > > Hi All, > > I have sample code like this: > > #!/usr/bin/perl > > # file: lgetr.pl > > #

doubt in code

2008-08-21 Thread Irfan J Sayed (isayed)
Hi All, I have sample code like this: #!/usr/bin/perl # file: lgetr.pl # Figure 1.2: Read the first line from a remote server use IO::Socket; my $server = shift; my $fh = IO::Socket::INET->new($server); my $line = <$fh>; print $line; As per comment it says that, it prints the first line

RE: doubt

2008-08-20 Thread Irfan J Sayed (isayed)
Thank you very much. Really helped. Regards Irfan. -Original Message- From: Mr. Shawn H. Corey [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2008 7:35 PM To: Irfan J Sayed (isayed) Cc: beginners@perl.org Subject: Re: doubt On Wed, 2008-08-20 at 19:03 +0530, Irfan J Sayed

RE: doubt

2008-08-20 Thread Irfan J Sayed (isayed)
Do I need to really give the full pathname of the file and store in the $file. What does this line means my $file = shift; Regards Irf. -Original Message- From: Andrew Curry [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2008 7:06 PM To: Irfan J Sayed (isayed); beginners

doubt

2008-08-20 Thread Irfan J Sayed (isayed)
Hi All, Can you please tell me what is the value of $file. When i execute this script . it says "Can't open : No such file or directory" Please suggect. Regards Irf. #!/usr/bin/perl # file: count_lines.pl # Figure 1.4: Count the lines of a file use strict; use IO::File; my $file = shift;

Remote command

2008-08-19 Thread Irfan J Sayed (isayed)
Hi All, Can somebody have the sample Perl script which will fire the "ls" command on remote linux machine and give the exit status whether it is success or failure. OR can somebody please guide me step by step how to achieve this Please help. Regards Irf.

RE: Execute the Linux command on remote machine

2008-08-19 Thread Irfan J Sayed (isayed)
machine "Irfan J Sayed (isayed)" schreef: > I have downloaded the Math::Pari module and was trying to install but > stuck Let's go back to the start. 1. Show us the output of `perl -V`. 2. Run perl -MCPAN -e 'install Math::Pari'. -- Affijn, Ruud "Gewoon i

RE: Execute the Linux command on remote machine

2008-08-19 Thread Irfan J Sayed (isayed)
ecute the Linux command on remote machine "Irfan J Sayed (isayed)" schreef: > Now I have installed entire Net::SSH::Perl module in the /tmp folder. It looks like you "copied" in stead of "installed". http://www.cpan.org/misc/cpan-faq.html#How_install_Perl_modules

RE: Execute the Linux command on remote machine

2008-08-17 Thread Irfan J Sayed (isayed)
r/lib/perl5/site_perl/5.8.7/i386-linux-thread-multi Do I need to again copy this module also. How long I should keep adding such modules. Please help Regards Irfan. -Original Message- From: Irfan J Sayed (isayed) Sent: Thursday, August 14, 2008 6:25 PM To: 'Rob Dixon'; Perl Be

RE: Execute the Linux command on remote machine

2008-08-14 Thread Irfan J Sayed (isayed)
command on remote machine Irfan J Sayed (isayed) wrote: > > Thanks for reply. > > I have Perl.pm installed in following path > [EMAIL PROTECTED] scripts]$ ls -l /tmp/Net/SSH/ total 32 > -rwxr--r-- 1 cgadgil cgadgil 32724 Aug 13 06:42 Perl.pm > [EMAIL PROTECTED] scripts]$ &

RE: Execute the Linux command on remote machine

2008-08-13 Thread Irfan J Sayed (isayed)
nt: Wednesday, August 13, 2008 6:36 PM To: Perl Beginners Cc: Irfan J Sayed (isayed) Subject: Re: Execute the Linux command on remote machine Irfan J Sayed (isayed) wrote: > > I want to execute one command on remote Linux machine. > > Following is the perl code. > > #! /usr/

RE: Execute the Linux command on remote machine

2008-08-13 Thread Irfan J Sayed (isayed)
t Regards Irfan. From: Sandeep Kumar [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 13, 2008 5:39 PM To: Irfan J Sayed (isayed) Cc: beginners@perl.org Subject: Re: Execute the Linux command on remote machine Irfan J Sayed (isayed) wrote: Still th

RE: Execute the Linux command on remote machine

2008-08-13 Thread Irfan J Sayed (isayed)
; my($stdout, $stderr, $exit) = $ssh->cmd(ls); Please help. Regards Irfan. -Original Message- From: Sandeep Kumar [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 13, 2008 3:27 PM To: Irfan J Sayed (isayed) Cc: beginners@perl.org Subject: Re: Execute the Linux command on remote

Execute the Linux command on remote machine

2008-08-13 Thread Irfan J Sayed (isayed)
Hi All, I want to execute one command on remote Linux machine. Following is the perl code. #! /usr/bin/perl; # perl module to parse the Install.log file for errors use lib "/tmp/"; use Net::SSH::Perl; my $ssh = Net::SSH::Perl->new(avm-qa-cam2.net.com); $ssh->login(cgadgil, cgadgil