perl question (46 Views)
Reply
Occasional Advisor
Pradeep Senevirathne
Posts: 8
Registered: ‎10-09-2008
Message 1 of 7 (46 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..........
Please use plain text.
Honored Contributor
Joseph Huber_1
Posts: 1,082
Registered: ‎02-03-2004
Message 2 of 7 (46 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
Please use plain text.
Honored Contributor
Craig A Berry
Posts: 491
Registered: ‎05-06-2003
Message 3 of 7 (46 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.

Please use plain text.
Occasional Advisor
Pradeep Senevirathne
Posts: 8
Registered: ‎10-09-2008
Message 4 of 7 (46 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
Please use plain text.
Honored Contributor
Joseph Huber_1
Posts: 1,082
Registered: ‎02-03-2004
Message 5 of 7 (46 Views)

Re: perl question



The perl-tk forum:
http://lists.cpan.org/showlist.cgi?name=beginning_perl_tk
http://www.mpp.mpg.de/~huber
Please use plain text.
Honored Contributor
H.Merijn Brand (procura
Posts: 6,185
Registered: ‎10-13-1997
Message 6 of 7 (46 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
Please use plain text.
Occasional Advisor
Pradeep Senevirathne
Posts: 8
Registered: ‎10-09-2008
Message 7 of 7 (46 Views)

Re: perl question

thanks a lot merijin brand.great, it worked.
Please use plain text.
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