Kudose wrote:I guess the old Perl rule of there's more than one way to do it definitely applies here.
Also, understanding the exact requirement always helps, e.g.: what is the nature of the file being included, why does it need to be truncated, is breaking in the middle of a word OK, how to handle HTML or other tags, etc., etc., and so forth.