my @clients; # The whole hash at once $clients[0] = { MAC => $mac, /* ... */ }; # Or setting individual bits $clients[0]->{MAC} = $mac;