in reply to [Class Assignment] Regex and Output Files
In addition to what toolic said above: See perlintro, and perlrequick or perlretut, both your questions are covered there.
Also, please mark your updates!