#!/usr/bin/perl -w use strict; use String::Random; my $string = new String::Random; print $string->randregex('\d\d\d\d\d'); # Prints 5 random digits print "\n"; ##just to separate the 2 output lines print $string->randpattern("....."); # Prints 5 random printable characters