Specifically,
my $fn = @_;
initializes $fn with the number of elements in the @_ array (array evaluated in scalar context). What is almost certainly wanted is
my ($fn) = @_;
or better yet
my $fn = shift;
to initialize $fn with the first element (index 0) of the array, Update: which, in this case, is an object reference by which an object method is called.
In reply to Re^2: Issue destroying image using perl/TK
by AnomalousMonk
in thread Issue destroying image using perl/TK
by nikwasi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |