Skip to content

Instantly share code, notes, and snippets.

@walf443
Created February 8, 2012 05:06
Show Gist options
  • Save walf443/1765591 to your computer and use it in GitHub Desktop.
Save walf443/1765591 to your computer and use it in GitHub Desktop.
use strict;
use warnings;
use List::Util;
use String::Random;
List::Util::shuffle(1, 2, 3);
my @pids;
for my $counter ( 1..3 ) {
my $pid = fork();
if ( $pid > 0 ) {
push @pids, $pid;
} else {
warn $$ . ": " . rand();
warn String::Random->new->randregex("[a-zA-Z0-9]{10}");
exit;
}
}
wait for @pids;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment