develooper Front page | perl.perl6.language | Postings from March 2005

Referencing a caller's slurpy array.

Thread Next
Rod Adams
March 14, 2005 23:54
Referencing a caller's slurpy array.
Message ID:
A06 says:

If you |shift| or |pop| without an argument, it shifts or pops whatever 
slurpy array is in scope.

Shall we assume that @_ is always an alias for this array, so I can say 
something like:

  multi sub pop (Array ?@array = @caller::_) returns Scalar


btw, is ?@ legal in a signature? It's not specifically mentioned in 
A/S04, but it makes sense it would be allowed along with ?%.

-- Rod Adams

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About