1748280 Members
3947 Online
108761 Solutions
New Discussion юеВ

Re: perl question

 
SOLVED
Go to solution
Pradeep Senevirathne
Occasional Advisor

perl question

i have array with values.i want to insert this array into text area one per line.up to now my code is............


my @res=[@res1,@res2];
my $tx->insert('end', @res);

text area display this result in same line.i want to display it value per line.

pls any help..........
6 REPLIES 6
Joseph Huber_1
Honored Contributor

Re: perl question

Well this has nothing to do with VMS, or VMS perl specific, You probably get more answers in a perl forum ...
but maybe Mr. Perl will answer later today :-)
http://www.mpp.mpg.de/~huber
Craig A Berry
Honored Contributor

Re: perl question

I don't know what Mr. Perl thinks, but I think you need to specify the question a bit more fully. What is a "text area"? What is the $tx object and what is its insert method documented to do (beyond the obvious)?

A wild guess would be to call the insert method once for each line of output you want rather than once overall.

Pradeep Senevirathne
Occasional Advisor

Re: perl question

how i post this question to perl forum.

if i state my problem in more clearly...i have array with some values.and i want to insert that array into text box in perl tk.i think now you understand my point.

thanks for your time
Joseph Huber_1
Honored Contributor

Re: perl question



The perl-tk forum:
http://lists.cpan.org/showlist.cgi?name=beginning_perl_tk
http://www.mpp.mpg.de/~huber
H.Merijn Brand (procura
Honored Contributor
Solution

Re: perl question

depends on what type of widget $x is

if $x is a ListBox widget,

$x->insert ("end", @res1, @res2);

would do what you require. If $x is a Text or ROText widget, you might want

$x->insert ("1.0", join "\n", @res1, @res2);

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Pradeep Senevirathne
Occasional Advisor

Re: perl question

thanks a lot merijin brand.great, it worked.