Re: perl question (102 Views)
Reply
Occasional Advisor
Pradeep Senevirathne
Posts: 8
Registered: ‎10-09-2008
Message 1 of 7 (102 Views)
Accepted Solution

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..........
Honored Contributor
Joseph Huber_1
Posts: 1,082
Registered: ‎02-03-2004
Message 2 of 7 (102 Views)

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
Honored Contributor
Craig A Berry
Posts: 495
Registered: ‎05-06-2003
Message 3 of 7 (102 Views)

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.

Occasional Advisor
Pradeep Senevirathne
Posts: 8
Registered: ‎10-09-2008
Message 4 of 7 (102 Views)

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
Honored Contributor
Joseph Huber_1
Posts: 1,082
Registered: ‎02-03-2004
Message 5 of 7 (102 Views)

Re: perl question



The perl-tk forum:
http://lists.cpan.org/showlist.cgi?name=beginning_perl_tk
http://www.mpp.mpg.de/~huber
Honored Contributor
H.Merijn Brand (procura
Posts: 6,188
Registered: ‎10-13-1997
Message 6 of 7 (102 Views)

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
Occasional Advisor
Pradeep Senevirathne
Posts: 8
Registered: ‎10-09-2008
Message 7 of 7 (102 Views)

Re: perl question

thanks a lot merijin brand.great, it worked.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.