http://qs321.pair.com?node_id=1219063


in reply to Re: Counting characters without a space
in thread Counting characters without a space

Just to illustrate how this might be done using Text::Wrap.
#!/usr/bin/perl use strict; use warnings; use Text::Wrap; my $s = '1234,4325,545678910,6544,4345,5443,3455,4321'; $Text::Wrap::columns = 15; $Text::Wrap::break = ','; # use this line if you need trailing commas at the end of each line #$Text::Wrap::separator = ",\n"; print wrap('', '', $s); __END__ C:\Old_Data\perlp>perl text_wrap2.pl 1234,4325 545678910,6544 4345,5443,3455 4321

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.