Stefan Bach: Bedeutung

Beitrag lesen

Hallo,

nur Perldoc (in dem Falle http://perldoc.com/perl5.8.0/pod/perlvar.html), probieren und Newsgroups mitlesen ;-)

In diesem Fall wohl eher perldata:

The length of an array is a scalar value. You may find the length of array @days by evaluating $#days, as in csh. However, this isn't the length of the array; it's the subscript of the last element, which is a different value since there is ordinarily a 0th element. Assigning to $#days actually changes the length of the array. Shortening an array this way destroys intervening values. Lengthening an array that was previously shortened does not recover values that were in those elements. (It used to do so in Perl 4, but we had to break this to make sure destructors were called when expected.)

In perlvar hatte ich gestern nämlich kurz gesucht und es nicht gefunden. (Ok, man hätte drauf kommen können, da $# in perlvar verwendet wird, aber ich habs nur überflogen.)

Viele Grüße,

Stefan

--
Lass dir das Tanzen NICHT verbieten
http://tanzverbot.de