in reply to Splitting a string into words
my $string = 'this is a test message'; my ($chunk) = $string =~ /(.{1,12})\b/; [download]