#!/usr/bin/perl while(){ my @numbers = ( 0..9, "A".."Z", "a".."z", 0..9 ); my $input=''; my $again=''; my $pass=''; print"How many chars: "; chomp($input = ); if($input <= '7'){ print"I would go for atleast 8 chars\n"; } if($input >= '8'){ print"If changed atleast monthly could be a good password\n"; } for(1..$input){ $pass .= $numbers [rand @numbers]; } print"\t$pass \n"; print"Would you like to do another?\n (Y)es (N)o: "; chomp($again = ); if($again =~ /N|n/i){ print"Ok good bye\n"; exit; } } exit;