- or download this
my %quick_allow = map { $_ => 1 } @allow_users;
- or download this
my @anon;
for (@allow_users) {
push @anon, do { $_ => 1 };
}
my %quick_allow = @anon;
- or download this
my %quick_allow;
for (@allow_users) {
$quick_allow{$_} = 1;
}
- or download this
my %ALL_USER_GROUPS = (
23 => [ qw( g1 g4 ) ],
13 => [ qw( g3 g5 ) ],
);
- or download this
my %ALL_USER_GROUPS = (
# key value
...
'23', [ 'g1', 'g4' ],
'13', [ 'g3', 'g5' ],
);
- or download this
# At the outmost level, you have a list of groups stored in a hash.
# List the keys (group ids) and fetch the corresponding value (group m
+embers).
...
print("\n");
}
- or download this
for my $gid ( keys %ALL_USER_GROUPS )
my $members = $ALL_USER_GROUPS{$gid};
...
print("Members: ", join(' ', @$members), "\n");
print("\n");
}