in reply to Re^4: PerlMagick Scene attribute
in thread PerlMagick Scene attribute

seems perfectly plausible thing to try

Sure, you could try to access $foo[42] if only $foo but not @foo is declared. But that won't help you at all: Perl will give you a runtime error with strict enabled. Without strict, perl will just pretend that $foo[42] exists and is undefined.

>perl -MData::Dumper -e 'print Dumper($foo[42])' $VAR1 = undef; >perl -MData::Dumper -e 'my $foo="bla"; print Dumper($foo[42])' $VAR1 = undef; >perl -MData::Dumper -Mstrict -e 'print Dumper($foo[42])' Global symbol "@foo" requires explicit package name (did you forget to + declare "my @foo"?) at -e line 1. Execution of -e aborted due to compilation errors. >perl -MData::Dumper -Mstrict -e 'my $foo="bla"; print Dumper($foo[42] +)' Global symbol "@foo" requires explicit package name (did you forget to + declare "my @foo"?) at -e line 1. Execution of -e aborted due to compilation errors. >

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Replies are listed 'Best First'.
Re^6: PerlMagick Scene attribute
by Anonymous Monk on Oct 01, 2017 at 20:37 UTC
    Well excuse me afoken  $image->[14]->Write...