You need to provide more details on what you want to do. To simply create a file you can use redirection ( > file or >> file2). The first creates a new file or zeros an existing file before writing. The send appends to the end of a file. You can also use sed or awk to edit a file based on patterns in the file. Sed and awk are often used to change a parameter in a config file.
You might want to go to the
http://www.tldp.org web site.
When it comes to perl, look for the CPAN.org website for a list of mirrors. They probably have lots of documentation.