RE: How to store the out put in StringBuffer

2004-10-24 Thread Sreedhar . Kalkunte-Venkatachala
Hithanks. problem resolvedI have added variable called $msg1.=$previousline;RegardsSreedhar-Original Message-From: Zeus Odin [mailto:[EMAIL PROTECTED]]Sent: 23 October 2004 22:40To: Kalkunte-Venkatachala, Sreedhar; [EMAIL PROTECTED]Subject: RE: How to store the out put in StringBuff

RE: How to store the out put in StringBuffer

2004-10-23 Thread Zeus Odin
ilto:[EMAIL PROTECTED] Sent: Saturday, October 23, 2004 12:38 PM To: [EMAIL PROTECTED] Subject: RE: How to store the out put in StringBuffer Hi Thank you very much for the mail. Say in the for loop it is printing var1 --> 1 var2 --> 2 var3 --> 3 var4 --> 4 var5 --> 5 var6 --> 6

RE: How to store the out put in StringBuffer

2004-10-23 Thread Zeus Odin
perldoc perldata perldoc perllol perldoc perlreftut Happy hunting, ZO -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Saturday, October 23, 2004 12:38 PM To: [EMAIL PROTECTED] Subject: RE: How to store the out put in StringBuffer Hi Thank you very much for

RE: How to store the out put in StringBuffer

2004-10-23 Thread Zeus Odin
ad: perldoc -f join Perldoc -f print -ZO -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Saturday, October 23, 2004 10:53 AM To: [EMAIL PROTECTED] Subject: RE: How to store the out put in StringBuffer Hi Thank you very much for the mail. at least can you tel m

RE: How to store the out put in StringBuffer

2004-10-23 Thread Sreedhar . Kalkunte-Venkatachala
-Venkatachala, Sreedhar; [EMAIL PROTECTED] Subject: RE: How to store the out put in StringBuffer Instead of doing print "text in chat" Do print CHAT "text in chat" Where CHAT is a file handle to your chat line. -Original Message- From: [EMAIL PROTECTED] [mailto:[EM

Re: How to store the out put in StringBuffer

2004-10-23 Thread Zeus Odin
What I think you are saying is that you are searching a log file for an error. If you find an error, you want to print out the last 10 lines (that would be the error line and The previous 9 lines) and the next 10 lines (total of 20 lines). Is this correct? You have to state the entire problem more

RE: How to store the out put in StringBuffer

2004-10-23 Thread Zeus Odin
m: Zeus Odin [mailto:[EMAIL PROTECTED] Sent: 23 October 2004 13:49 To: Kalkunte-Venkatachala, Sreedhar; [EMAIL PROTECTED] Subject: RE: How to store the out put in StringBuffer This is a *quick* emulation of tail. Emphasis on quick as in quickly done. If you want to return only lines that match a reg

RE: How to store the out put in StringBuffer

2004-10-23 Thread Sreedhar . Kalkunte-Venkatachala
2004 13:49 To: Kalkunte-Venkatachala, Sreedhar; [EMAIL PROTECTED] Subject: RE: How to store the out put in StringBuffer This is a *quick* emulation of tail. Emphasis on quick as in quickly done. If you want to return only lines that match a regular expression, add the line: next unless /$regexp

RE: How to store the out put in StringBuffer

2004-10-23 Thread Sreedhar . Kalkunte-Venkatachala
Message- From: Bee [mailto:[EMAIL PROTECTED] Sent: 23 October 2004 13:44 To: Kalkunte-Venkatachala, Sreedhar; [EMAIL PROTECTED] Subject: Re: How to store the out put in StringBuffer Simplified your code, that is : print foreach @buffer; my $i; while() { $i++; last if ($i > 10); pr

RE: How to store the out put in StringBuffer

2004-10-23 Thread Zeus Odin
gt; $lines; if (eof) { print "\n$ARGV:\n"; print $_ foreach @tail; } } -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Saturday, October 23, 2004 7:32 AM To: [EMAIL PROTECTED] Subject: RE: How to store the out put in StringBuffer Hi Bas

Re: How to store the out put in StringBuffer

2004-10-23 Thread Bee
Simplified your code, that is : print foreach @buffer; my $i; while() { $i++; last if ($i > 10); print; } I can't see anything make sense to make the thing @buffer be in pair with . The first loop and the second don't related to each other at all... What do you expect ? Could you show s

RE: How to store the out put in StringBuffer

2004-10-23 Thread Sreedhar . Kalkunte-Venkatachala
seek(LOGFILE, $pos, 0); } } sleep(1); seek(LOGFILE, $cursorposition, 0); } -Original Message- From: Zeus Odin [mailto:[EMAIL PROTECTED] Sent: 23 October 2004 12:29 To: Kalkunte-Venkatachala, Sreedhar Subject: Re

Re: How to store the out put in StringBuffer

2004-10-23 Thread Zeus Odin
First, always use warnings; use strict; at the top of each program you write. Second, what are you trying to do exactly? Third, some observations: 1) You use $j and $pos exactly one time. Why are they present? 2) You seem to be looping to 10 using $i. Why not instead use for my $i(1 .. 10) {