How come this no longer works?
Because you changed your code and added a wantarray perhaps? You are assigning SCALAR context to the return value of your curselection function by using it as an array index. According to Perl it is returning an array ref. This is not a valid index. In your working example you assign ARRAY context to the function call, then that array is evaluated in SCALAR context in the index. Your issue would occur as you say if you had:
sub curselection { # # was return @array; return wantarray ? @array : \@array; }
The @$ and $$ issues relate to their precedence being higher than -> so you need @{$a->blah}
cheers
tachyon
In reply to Re^3: Tk warning using curselection() with ActiveState 5.8.4
by tachyon
in thread Tk warning using curselection() with ActiveState 5.8.4
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |