in reply to finding number of contiguous letters
The while loop worked fine with substring.
$in_string = "supercalifragic" $str_length = length($in_string); $stop_loop_num = $str_length - 2; $temp_counter = 0; while ( $temp_counter < $stop_loop_num ) { $three_chars = substr($in_string); push @str_elements, $three_chars; $temp_counter++; }
While it's functional, I'm certain there is a better way and I'm always striving to learn!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: finding number of contiguous letters
by blazar (Canon) on May 23, 2007 at 09:48 UTC |
In Section
Seekers of Perl Wisdom