in reply to Dereferencing complex data w/o intermediate variable

Thanks, that was easy...seems I need to put the extra {}'s before the "@" or the "$#" Now I do vaguely remember reading something about not having two of those characters next to each other...

thanks!!!!

Replies are listed 'Best First'.
Re: Re: \ref
by John M. Dlugosz (Monsignor) on Sep 19, 2001 at 10:12 UTC
    Right, I figured that's your problem but didn't get here first to answer <g>.

    They are not extra braces. Rather, the braces may be optionally omitted if the thing is a simple scalar name.

    So, you can say:

    $temp= $x->foo(); @list= @$temp;
    because $temp is a simple scalar name. The canonocal form would be @{$temp}. So, to get rid of the temp, say:
    @list= @{$x->foo()};
(tye)Re: \ref
by tye (Sage) on Sep 19, 2001 at 20:27 UTC