my ($what) = @_; my $what_val = $what->get; # use get to access contents of entry $canvas ->createText($range[0],$range[1], -text=>"$what_val\n");