in reply to Splitting a string into words

Something like:
$msg = "This is a test message"; @lines = $msg =~ /(?>\s*)(.{0,11}\S)(?!\S)/g;
Update: this strips leading characters if any \S+ "word" is longer than 12.