my @sports = ('soccer', 'football'); my @games = ('tetrinet', 'counter-strike'); my %access; foreach my $s (@sports) { $access{sports} .= {$s => 1}; } foreach my $g (@games) { $access{games} .= {$g => 1}; } my $empty; my $session = new CGI::Session(undef, $empty, {Directory=>"c:/apache/cgi-bin/tmp"}); $session->param("access", %access);