dato che ti arriva da un cut ... unix :<br>1) lo leggi da un file ( qui rappresentato da ___DATA___ ) <br>2) lo leggi da STDIN se metti il programma in coda a tutto dopo un |.<br>3) Usi il programma perl con una open su comando filesystem.<br>
per il punto 3 vedi il tutorial sul comando open<br><br>Ciao<br>Giulio<br><div class="gmail_quote">2009/11/5 Oha <span dir="ltr">&lt;<a href="mailto:oha@oha.it">oha@oha.it</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
un po spaghetti ma magari puo&#39; esser uno spunto:<br>
<br>
use strict;<br>
use warnings;<br>
<br>
use Data::Dumper;<br>
<br>
my %data;<br>
my %cols;<br>
while(&lt;DATA&gt;)<br>
{<br>
    chomp;<br>
    my @cols = split /s+/;<br>
    my $first = shift @cols or next;<br>
    my $second = shift @cols;<br>
    my %other = map { /([^(]+)((d+))*?/; $cols{$2}++; ($2,$1); } @cols;<br>
    $other{__perc} = $second;<br>
    $data{$first} = %other;<br>
}<br>
<br>
foreach my $k (sort keys %data)<br>
{<br>
    my $other = $data{$k};<br>
    print $k, &quot;t&quot;, $other-&gt;{__perc}, &quot;t&quot;;<br>
    foreach my $c (sort { $a &lt;=&gt; $b } keys %cols) {<br>
        my $v = $other-&gt;{$c};<br>
        print $v ? &quot;$v($c)t&quot; : &quot;-t&quot;;<br>
    }<br>
    print &quot;n&quot;;<br>
}<br>
<br>
__DATA__<br>
<div class="im">1opj-A 100.0 M309(67)* F401(159)* F336(94)* I379(137)* A399(157)* K290(48)* I332(90)* Y272(30)* V275(33)* A288(46)* L267(25)* V318(76)* H380(138)* L389(147)* T334(92) D400(158) M337(95) E305(63)<br>
2hyy-A 99.2 F382(147)* M290(55)* F317(82)* I360(125)* Y253(19)* A269(35)* H361(126)* L248(14)* A380(145)* K271(37)* V289(54)* I313(78)* L370(135)* V256(22)* I293(58)* V299(64)* D381(146) T315(80) M318(83) E286(51)<br>
2pl0-A 48.3 Y318(88)* F383(153)* A271(41)* M319(89)* I361(131)* M292(62)* I314(84)* A381(151)* K273(43)* V301(71)* H362(132)* V259(29)* L291(61)* D382(152) T316(86) E288(58)<br>
<br>
<br>
<br>
<br>
</div><div><div></div><div class="h5">_______________________________________________<br>
Milan-pm mailing list<br>
<a href="mailto:Milan-pm@pm.org">Milan-pm@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/milan-pm" target="_blank">http://mail.pm.org/mailman/listinfo/milan-pm</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Giulio Bertani<br><a href="http://www.perquelliche.it">www.perquelliche.it</a> (In definizione ...)<br>