| Server IP : 50.21.180.56 / Your IP : 216.73.216.139 Web Server : Apache System : Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux User : ws67922704 ( 67922704) PHP Version : 8.5.13 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /kunden/usr/share/doc/libbytes-random-secure-perl/examples/ |
Upload File : |
use strict;
use warnings;
use utf8;
use Bytes::Random::Secure qw( random_string_from );
my $quantity = 64;
my $bag = 'abcde';
# Generate a random string of 64 characters, each selected from
# the "bag" of 'a' through 'e', inclusive.
my $string = random_string_from( $bag, $quantity );
print $string, "\n";
# Unicode strings are ok too (Perl 5.8.9 or better):
if( $^V && $^V ge v5.8.9 ) {
$string = random_string_from( 'Ѧѧ', 64 );
binmode STDOUT, ':encoding(UTF-8)';
print $string, "\n";
}