RE: seek(FH, 0,0) not working

2005-05-08 Thread TapasranjanMohapatra
-Original Message- From: N. Ganesh Babu [mailto:[EMAIL PROTECTED] Sent: Mon 5/9/2005 10:27 AM To: Perl Beginners List Subject: seek(FH, 0,0) not working Dear All, In the attached file, the date is present in the last line. My requirement is to capture the date and fill it in the

RE: grep pattern problem

2005-04-27 Thread TapasranjanMohapatra
-Original Message- From: Ing. Branislav Gerzo [mailto:[EMAIL PROTECTED] Sent: Tue 4/26/2005 8:51 PM To: beginners-cgi@perl.org Subject: Re: grep pattern problem TapasranjanMohapatra [T], on Monday, April 25, 2005 at 17:51 (+0530) wrote: T The directory and files have all permissions

PATH problem

2005-04-25 Thread TapasranjanMohapatra
All, My script goes like this... -- #!/usr/bin/perl print Content-type: text/html\n\n; $cmd = cat file_one; $content = qx!$cmd!; print $content; -- I have a case where file_one is not in the same directory. So I give the

grep pattern problem

2005-04-25 Thread TapasranjanMohapatra
All, I am trying to print the output of grep command through cgi. When I do grep on a specific file I get the desired output, but while I try something like grep -Ri pattern ../directoryname/ I get no output when I run cgi(browser) though I get the output correctly run in commandline (perl).

printing output of ping command

2005-02-23 Thread TapasranjanMohapatra
Hi All, I have a script as follows my $host = shift; my $count = shift; my $result = `ping -c $count $host`; if($result =~ m/$count packets transmitted, $count packets received/) { $success = 1; } print $result\n; Now, when I run the

RE: Perl waits for while to finish before printing if on the same line,why?(countdown prog)

2005-02-20 Thread TapasranjanMohapatra
-Original Message- From: Harold Castro [mailto:[EMAIL PROTECTED] Sent: Mon 2/21/2005 9:42 AM To: beginners@perl.org Cc: Subject:Perl waits for while to finish before printing if on the same line,why?(countdown prog) Hi, I'm new to perl and i'm trying to create a

printing output of a command

2005-02-20 Thread TapasranjanMohapatra
All, i am new to cgi. Please let me know why I dont get the data printed? I have abc.cgi in /var/www/cgi-bin When the $cmd is ls I get the filenames when I visit localhost/cgi-bin/abc.cgi But when the $cmd is the snmpquerry, I get nothing on the page, though I get the desired output(value of

RE: IS there any way to get rthe content of the file

2005-02-10 Thread TapasranjanMohapatra
-Original Message- From: Anish Kumar K. [mailto:[EMAIL PROTECTED] Sent: Fri 2/11/2005 11:40 AM To: beginners perl Cc: Subject:IS there any way to get rthe content of the file Hi I wanted to read the content of file in one varaible. Now I am doing open INPUT,

while(1){print a; sleep 1;}

2005-02-09 Thread TapasranjanMohapatra
Hi All, Why I dont get a's printed with the code below? +++ while(1) { print a; sleep 1; } +++ It works well if I print a newline with a, i.e while(1) { print a\n; # newline with a sleep 1; } Please help if you know the cause. TIA

RE: while(1){print a; sleep 1;} -my thanks

2005-02-09 Thread TapasranjanMohapatra
-Original Message- From: Chris Devers [mailto:[EMAIL PROTECTED] Sent: Wed 2/9/2005 8:01 PM To: TapasranjanMohapatra Cc: Perl Beginners List Subject:Re: while(1){print a; sleep 1;} On Wed, 9 Feb 2005, TapasranjanMohapatra wrote: Why I dont get a's printed

RE: How to find the Index of an element in array?

2005-01-26 Thread TapasranjanMohapatra
-Original Message- From: Mallik [mailto:[EMAIL PROTECTED] Sent: Thu 1/27/2005 12:56 PM To: Perl-Trolls Cc: beginners@perl.org Subject:How to find the Index of an element in array? I need to find the index of a particular element in array. For eg., @arr = ('abc',

Subroutine call

2004-11-24 Thread TapasranjanMohapatra
Hi All, I have a querry if the following can be possible. Suppose I have many sub routines in a module abc.pm package abc; sub zzzq { } sub zzze { } sub zzzr { } Now I use this module in another script. I want to call the sub routines, as suggested by the argument passed to the script. i.e.

What is perl equivalent of scanf in C

2004-08-25 Thread TapasranjanMohapatra
All, Can somebody let me know what is the Perl equivalent of scanf in C. Is it String::Scanf or there are some other options by which we can take key board input. Thank You. Tapas -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: swapping in perl

2004-07-23 Thread TapasranjanMohapatra
-Original Message- From: Jaffer Shaik [mailto:[EMAIL PROTECTED] Sent: Fri 7/23/2004 11:10 AM To: Perl Cc: Subject:swapping in perl Dear Friends, I want to swap 2 variables without using a tempoarary variable. I know the below logic a=a+b b=a-b

RE: Help in using Modules

2004-04-08 Thread TapasranjanMohapatra
Hi Urvashi, You can write ## use lib directory path where you have put you modules; use Nary.pm; ## in the begining of your script. -Original Message- From: urvashi mishra

Using Perl Expect.pm

2004-03-25 Thread TapasranjanMohapatra
Hi, Can someone tell me how to handle the vt100 sequences using expect module of perl. I have used the same sequences while using TCL Expect. It works fine. But I don't understand what is the problem while I try doing the same thing using Perl Expect. If my TCL Expect Code goes like:-