Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re^2: Counting characters without a space

by Cristoforo (Curate)
on Jul 22, 2018 at 22:34 UTC ( #1219063=note: print w/replies, xml ) Need Help??

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 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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1219063]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2020-10-01 12:48 GMT
Find Nodes?
    Voting Booth?
    My favourite web site is:

    Results (11 votes). Check out past polls.