in reply to sorting an array
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; [download]