Password generator: Difference between revisions

Line 3,081:
}
 
sub char-groups( @exclude is copy )
{
state @special = < $ % & \ ` ~ ! * + , - . / : ; = ? @ ^ _ ~ [ ] ( ) { | } # ' " \< \> >;
 
my %char-groups =
lc => ['a' .. 'z'],
uc => ['A' .. 'Z'],
digit => ['0' .. '9'],
special => (< @special$ % & \ ` ~ ! * + , (-) . / : ; = ? @exclude ^ _ ~ [ ] ( ).keys { | } # ' " \< \> >;
 
for %char-groups< special >:delete.keys
{
unless %char-groups< special >;
%char-groups{ $_ } = %char-groups{ $_ } (-) @exclude;
%char-groups{ $_ }:delete unless %char-groups<{ special$_ >};
}
 
%char-groups;
Anonymous user