in reply to Mapping restrictions

That second one can also be written:
%h1=( 1=>"one", 2 => "two", 3 => "three", 4 => "four"); @set=(1, 3, 5, 7); my %h2 = %h1; delete @h2{@set};

-- Randal L. Schwartz, Perl hacker

Replies are listed 'Best First'.
RE: RE: Mapping restrictions
by brother ab (Scribe) on Sep 15, 2000 at 09:23 UTC

    You are right, absolutely. I have found this solution hour after sending. Really, we sould not include extra pairs, but we can delete anything irrelevant.
    I like solution with map/grep for the first case suggested by runrig.

    But - what about range restrictions? Could somebody suggest nice-looking snippet? I could not yet :(

    -- brother ab