develooper Front page | perl.beginners | Postings from March 2002

accessing an array with a variable

Thread Next
March 5, 2002 07:06
accessing an array with a variable
Message ID:

I believe it is possible to access an array through a variable, but I'm
ghaving trouble doing it.
I want to read in a text file and display it, on line at a time, depending
on an 
increment counter triggered by a 'next' or 'previous' button.

I am trying to do this with Perl/Tk, but it fails to work, only displaying
the initial line of the text file:

This is the definition of the variable


$num is incremented elsewhere with the click of the button.

This is the attempt to display the variable on screen.

$txtmain->configure(-textvariable => \$line,

I know that the incrementing is successful because replacing $line with $num
as the -textvariable gives the right output.

Any help would be greatly appreciated.

Dennis Warren

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About