my @chars = ('a'..'z', 'A'..'Z', 0..9, '.', '/'); my $salt = join '', @chars[rand @chars, rand @chars];