in reply to Data structures problem

This behaviour is exactly as it should be, because your shift returns an arrayref. If you want it to be a plain list, dereference it:
my @entry = @{shift(@{@datastructure{'foo'}})};


holli, /regexed monk/

Replies are listed 'Best First'.
Re^2: Data structures problem
by MrFlibble (Initiate) on Feb 20, 2006 at 14:28 UTC
    Woohoo! It works!

    Thanks a lot. I've been trying every possible combination I could think of to get it to return what I wanted; I guess I never tried that one :-)

    I don't doubt that the behaviour is exactly as it should be, only that I didn't understand it ;-)

    Anyway, thanks for the solution. Would you believe I've spent nearly 2 days trying to sort this datastructure? I used to be really good at Perl (I've written big applications with large hashes of lists of lists of subroutine references etc...), but that was quite a few years ago, and now I rarely even need to use a simple unidimensional list.

    Forgive me, for I have sinned...