Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I think your "padding" algorith might be a bit wonky. Given a string of length, say, 19 characters you would arrive at a $padding value of 3, thus padding your $str with three "x"s to end up with a length of 22, not 24 as I think you wanted. This should work (not tested)
The remove padding part would be something like (again, not tested)
Cheers, JohnGG Update: I must have been half-asleep; where's the length call? Line should be
You can't do modulo on a string :)
In reply to Re^3: Splitting a string to chunks
by johngg
|
|