Hallo,
sub print
{
my $self = shift;
print "Elemente: " . @$self->{'windows'} . "\n";
}
>
> Ausgabe: Not an ARRAY reference at blabla.pm line 12.
$self ist auch kein arrayref.
~~~perl
foreach my $item (@{$self->{windows}})
{
print;
}
sub new { bless {'windows' => ()}, shift; }
das ist kein arrayref.
z.B. http://perldoc.perl.org/perlref.html
Hth