Новости | FAQ | Авторы | Документация | В действии | Библиотека |
Инструменты | Полезные ссылки | Хостинги | Скачать | Примеры | Форум |
Александр Петросян (PAF) 13.09.2005 09:46
вроде всё работает, но что-то не так:while(<>) { chop; @fields=split /\t/, $_, 100; $id=shift @fields; @stable=splice @fields,0,3; $stable=join "\t", @stable; $stable2ids=\@{$stable2ids{$stable}}; push @$stable2ids, $id; $accum=\@{$accum{$stable}}; $index=0; foreach $field(@fields) { if($stable eq "\t\t") { $accum->[$index]=undef; } else { if(($field)gt($accum->[$index])) { $accum->[$index]=$field; } } $index++; } } foreach $stable(sort keys %accum) { foreach $id(sort @{$stable2ids{$stable}}) { print join "\t", $id, $stable, @{$accum{$stable}}; print "\n"; } }