This method must return a list, and the fifth element was the only thing useful to the caller. Expanding it out, it may make more sense.

my $bg = ($c->itemconfigure(qw/current -background/))[4];
my @values = $c->itemconfigure(qw/current -background/); my $bg = $values[4];

You often see this for builtin functions like stat() or localtime(). They return lists of potentially useful stuff, but you may only need one thing. The documentation for each one clearly shows the meaning of each returned value in a list of returned values.

--
[ e d @ h a l l e y . c c ]


In reply to Re: Strange construct by halley
in thread Strange construct by dlal66

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":