Hi!
I am trying to figure out a simple, Perl way to break down any sting similar
to the following:
$s0 =
"01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,
26,27,28,29";
Or in any numeric order. The string cannot be longer than 55 characters and
end with ",".
Ex:
$s1 = "01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,";
$s2 = "22,23,24,25,26,27,28,29"
I know that I can use the following to start:
if( length $s0 > 55 ) {
$s1 = substr( $s0, 0, 54 );
$s2 = substr( $s0, 54, length $s0 );
}
Thanks,
Jerry