note
sifukurt
The only thing you'll have to be wary of with some of the previous examples is if your string, $a, contains a number of digits that isn't evenly divisible by 3, your array won't contain the last 1 or 2 digits. If that is what you want, then you needn't worry about this. If, however, you want the last element in your array to contain the last digits even if the length of your string isn't evenly divisible by 3, you'll want to do something like this:
<code>
$a = '12345678901';
while ( $a =~ /(\d{3})/g ) {
push ( @nums, $1 );
$last = $';
}
if ( length($a) % 3 ) {
push ( @nums, $last );
}
</code>
In the above example, @nums will contain:<br>
123<br>
456<br>
789<br>
01<br>
<br>
There may be a more elegant way of doing this, but it works. Hope this helps.
<br>
___________________<br>
Kurt
115547
115547