Perl code to create random string of characters
mixed-case, alphanumeric, 8 chars long
http://www.perlmonks.org/?node_id=233023
#!/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";
From JR's : articles
32 words - 250 chars
created on
updated on
- #
source
- versions
Related articles
Perl try, catch, eval, die, warn, carp - Jun 25, 2013
Scaup web publishing app update as of Feb 21, 2015 - Mar 02, 2015
Testing module to keep in mind - November 2002 - Jul 18, 2014
Loop through a Perl array - Oct 02, 2013
Perl Critic and Diag - Oct 09, 2013
more >>