in reply to sorting an array

If I understand you correctly:
my @temp; my @newarray; foreach(@array) { next if (/^\*+\d+\*+$/); if (/^\*+end\d+\*+$/) { push @newarray,join"",@temp; @temp = (); next; } push @temp,$_; } push @newarray,join"",@temp if (@temp); @array=@newarray;


T I M T O W T D I