In Perl, you would use the open(FILEHANDLE) "function".<br><br>Here's an example script that opens a file, and prints a user name and password to it.<br><br><FONT FACE=monospace><br>#!perl -w<br><br><br>print "Enter an user name:\n";<br>$user = <STDIN>; # get keyboard input and name it $user<br>chomp($user) # remove the trailing new line<br>print "Enter a password:\n";<br>$pass = <STDIN>;<br>chomp($pass);<br><br># ok, here is where the "magic" happens<br><br>open(FILE, "<<file.txt"

¦¦ die("can't find file"

;<br>print FILE "$user : $pass\n";<br>close(FILE);<br><br>print "Thank you, $user, for entering your password, $pass, into the file\n";<br><br>exit;<br><br></font><br><br><br>Explanation: The code: <FONT FACE=monospace> open(FILE, "<<file.txt"

¦¦ die("can't find file"

;<br>print FILE "$user : $pass\n";<br>close(FILE); </font><br><br>opens the file named file.txt. If the file does not exist, then it will display the line "can't find file", in which case, you can create a blank text file.<br><br>The next line, <FONT FACE=monospace>print FILE "$user : $pass\n";</font> prints the prints the username entered and the password entered, into the file, seperated by a colon.<br><br>And, finally, the last line, <FONT FACE=monospace>close(FILE);</font> closes the file so that no more changes can be made.<br><br>There is a lot more that you can do with files, I hope this helps.<br><br><br>Vic.<br>