in reply to Re: Re: Back to Remedial Perl for Me: map{} function
in thread Back to Remedial Perl for Me: map{} function

I wasn't commenting on either of those. I was commenting on the original poster's last example:
if ($access) { foreach (@{$access}) { $set{$_->[0]} = $_->[1]; } }
That's just fine as it is. No need for a map. In fact, a map would be difficult here, unless we presume %set is already empty before we get here.

-- Randal L. Schwartz, Perl hacker

Replies are listed 'Best First'.
Re: Re: Re: Re: Back to Remedial Perl for Me: map{} function
by mikfire (Deacon) on Dec 15, 2000 at 20:39 UTC
    Ahh. I got scope locked and assumed that you were referring to the map examples, not the foreach loop.

    Thanks
    mikfire