Txt files and testing string manipulation with perl