in reply to Re: Issue destroying image using perl/TK
in thread Issue destroying image using perl/TK
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Issue destroying image using perl/TK
by nikwasi (Initiate) on Mar 23, 2011 at 16:34 UTC | |
by lamprecht (Friar) on Mar 23, 2011 at 19:11 UTC |