substr can help with carving up a string, and if you use it coupled with an array, you could easily tell how many chunks you split the string into by seeing how big the array is...
my @chunks; while ( 1 ) { my $chunk = substr( $initial, 0, 100, "" ); last unless length $chunk; # was it empty? push @chunks, $chunk; } print scalar(@chunks), " chunks\n";
--k.
In reply to Re: Parsing Form Input
by Kanji
in thread Parsing Form Input
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |