in reply to creating new files bases on string size
What have you tried? Where are you stuck?
Maybe start with perlintro?