http://www.perlmonks.org?node_id=830124


in reply to Re^4: compiling perl scripts aka why is perl not as fast as C
in thread compiling perl scripts aka why is perl not as fast as C

@array acts like a function. It takes an arg and returns a value based on the input and context.

Excuse me but, what would be the argument?

--
 David Serrano
 (Please treat my english text just like Perl code, i.e. feel free to notify me of any syntax, grammar, style and/or spelling error. Thank you!).

Replies are listed 'Best First'.
Re^6: compiling perl scripts aka why is perl not as fast as C
by ikegami (Patriarch) on Mar 22, 2010 at 17:56 UTC
    The array / array name / pad slot
    sub array { my ($self) = @_; wantarray ? $self->length : $self->contents }