Re: my (fooref) = shift;
- From: krahnj@xxxxxxxxx (John W. Krahn)
- Date: Wed, 27 Apr 2005 12:12:57 -0700
Matthew Sacks wrote:
I see many examples in the camel book where a subroutine takes one argument and the one argument is an array ref.
my (foo_ref) = shift;
There is however at least one example where it is
my foo_ref = shift;
I am trying to figure out if this matters. What would shift care about list context? shift should still yield one thing an array ref??? See page 356 in the camel book, and page 224. (I think). matthewsacks1415@xxxxxxxxx
shift() returns a scalar in either list context or scalar context so both statements do the same thing.
John -- use Perl; program fulfillment .
- References:
- my (fooref) = shift;
- From: Matthew Sacks
- my (fooref) = shift;
- Prev by Date: Re: REGEXP removing - il- - -b-f and - il- - - - f
- Next by Date: Re: Spread***::ParseExcel - Out of memory error
- Previous by thread: my (fooref) = shift;
- Index(es):