in reply to Re: How to split a string based on character(s) length
in thread How to split a string based on the length of a sequence of characters within the string

Hello ikegami,

Your code works perfectly also. By the way I never though to right the code like this my @chunks = $input =~ /(.{1,10})/g;. I did not imagine that can work the array equal to the string straight. Thanks for the tip and for your time to assist me with my question.

Seeking for Perl wisdom...on the process of learning...not there...yet!

Replies are listed 'Best First'.
Re^3: How to split a string based on character(s) length
by ikegami (Patriarch) on Aug 15, 2014 at 03:55 UTC
    I'm not sure what you mean by that.
    $input =~ /(.{1,10})/g
    returns a list of strings just like
    unpack("(A10)*", $input)
    does. (In list context, of course.)