in reply to Changing file contents

You have rnahi's answer - it's a shortcut, no offence but I think it's a bit too magic for your level of perl mastery. Here are my instructions: Then the progarm should be obvious.