You're viewing old version number 1. - Current version

Perl code to create random string of characters

mixed-case, alphanumeric, 8 chars long

#!/usr/bin/perl -wT

use strict;

my @chars = ("A".."Z", "a".."z", "0" .. "9");
my $string;
$string .= $chars[rand @chars] for 1..8;

print $string . "\n";

#perl #programming

From JR's : articles
31 words - 208 chars
created on - #
source - versions

Related articles
Perl Dancer Framework - Dec 19, 2013
Perl HTML parsing modules - Oct 01, 2013
Perl code for string processing - Jul 06, 2013
Perl and Curl - Mar 23, 2015
Perl conditional loading modules - Oct 02, 2014
more >>



A     A     A     A     A

© 2013-2017 JotHut - Online notebook

current date: May 21, 2024 - 3:00 p.m. EDT