for @eths X @nets -> $eth, $net { %netifaces{$eth}{$net} = 1; } #### for @eth { %netifaces{$eth} = ( @nets X=> 1 ).hash }