in reply to Why does 'print shift sort @array' not work?

As shift removes an element from its argument (an array), there must be an actual array data structure to remove from. In your case it's just a list of values on the Perl internal stack.

Replies are listed 'Best First'.
Summary of Posts
by pat_mc (Pilgrim) on Mar 12, 2009 at 21:00 UTC
    Thanks to almut - and all the others who took the time to respond.

    I was erroneously under the impression that the terms 'list' and 'array' are fully synonymous in Perl ... which, of course, they are not. Most of the comments posted confirm, what I could have found at the beginning of chapter 3 in the Llama book as well where it says:
    "A list is an ordered collection of scalars. An array is a variable that contains a list. In Perl, the two terms are often used as if they're interchangeable. But, to be accurate, the list is the data, and the array is the variable."
    With shift operating on an array and returning a list, all is clear now. Thanks again to all of you who contributed to the clarification.

    Cheers -

    Pat