----------------------------- sub generatePassword { my $length = shift; my $possible = 'abcdefghijkmnpqrstuvwxyz23456789ABCDEFGHJKLMNPQRSTUVWXYZ'; while (length($password) < $length) { $password .= substr($possible, (int(rand(length($possible)))), 1); } } sub pleaseGodWork { generatePassword(8); my $readfile = "index.txt"; my $writefile = "index.html"; open (MYFILE, "$readfile") || die ("Cannot open $file: $!"); open (YOURFILE, ">$writefile") || die ("Cannot open $file: $!"); @copy_this = ; print YOURFILE (@copy_this); } close (MYFILE); close (YOURFILE); pleaseGodWork(); exit; -----------------------------