+ # Print out all the DS definitions we need
+ for (my $new_index = 0; $new_index < @$InDS; $new_index++)
+ {
+ my $old_index = $ds_index->[$new_index];
+ print $fh $out_cache->[$old_index];
+ }
+
+ # Clear the cache - it's used in state1, too.
+ for (my $i = 0; $i <= $current_index; $i++)
+ {
+ $out_cache->[$i] = '';
+ }
+