Counter param value not passed from one sub to another

A

aardvarkman

Howdy,

I count some items in someSub, and I can print to STDOUT ok. In other
words, $uniqueitem_counter has a value. I then call showCounters which
should display a string and the value of $uniqueitem_counter. However,
it only shows the string. I've stared at this for quite a while and
just can't grasp why $uniqueitem_counter isn't showing up in the UI
when I know it has a value.

thanks,

ben


###### Sub in which counting occurs.

sub someSub {
.......
bunch of code
$uniqueitem_counter++;
......
print STDOUT ("Found $uniqueitem_counter unique items."); # Prints
ok.
showCounters("Unique items found:", $uniqueitem_counter);
}


########### Panel to display count result.

my $belowTabsUISub4 = $belowTabsUISub2 -> Frame()-> pack();

sub showCounters($$) {

$belowTabsUISub4 -> Label(-text => $_[0])-> pack(); # Prints
$belowTabsUISub4 -> Label(-textvariable => $_[1],-fg => 'red')->
pack(); # Doesn't print.

}
 
A

aardvarkman

AAAArgh!

$belowTabsUISub4 -> Label(-textvariable => $_[1],-fg => 'red')->

Should have been:

$belowTabsUISub4 -> Label(-text => $_[1],-fg => 'red')->
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,571
Members
45,045
Latest member
DRCM

Latest Threads

Top