DD: 11/09/2009 AU: jas dimaano PP: Employee ID list PP: (489459) Jas = DS16 -> with SPi since 2005/04/04 AND with ECO ever since PP: Sam = FT35 -> resigned last 09-03-2008 PP: Evan = AT89 -> transferred last 20070605 to Journals PP: there's more... === DD: july 11, 2009 AU: Jr s. Tolentino, -editor PG: page 9 PP: Earn points now! PP: Yes! You heard it right! (635436) #### #!usr/local/bin/perl $filename = "input.txt"; open (FILE,"<$filename"); @fileinput=; close(FILE); foreach $line(@fileinput) { my $test=($line); #add written by and capital the first letter of each word if($test=~s/AU: \b(\w+)|AU: \b(w+)\s\b(w+)/AU: Written by: \u$1 \u$2/g) { print $test; } }