sub pin { srand; my $pin; my $i = 0; while ( $i++ < 4 ) { $pin .= int( rand(9) ); } return $pin; }