In my prior emails, I have been mentioning @tail. @tail is an array and can
contain a list of values. An array is the one variable that can do what you
require. Please view the documentation and understand arrays and lists. A
hash will work also but I believe you want an array.

perldoc perlintro
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 the mail.

Say in the for loop it is printing
var1 --> 1
var2 --> 2
var3 --> 3
var4 --> 4
var5 --> 5
var6 --> 6


How to store var1,2,3,4,5,6 to one variable --> $Newvar should print 
1
2
3
4
5
6

A buffer kind

i.e 6 lines is should store in one variable. Am I asking some thing wrong

regards
Sreedhar




-----Original Message-----
From: Zeus Odin [mailto:[EMAIL PROTECTED]
Sent: 23 October 2004 17:17
To: Kalkunte-Venkatachala, Sreedhar; [EMAIL PROTECTED]
Subject: RE: How to store the out put in StringBuffer


If you want to print to a handle, you must 
  print CHAT "text";
If all of your text is in @tail, you can
  print CHAT join '', @tail;
If you still want to print $var for some reason
  my $var = join '', @tail;
  print CHAT $var; 

Does that make sense?

Please read:
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 me how to store in one variable called $var  (the
result of print $_ foreach @tail;).

because I can print the complete output in one shot.

Regards
Sreedhar



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to