Quote:
Originally Posted by repinementer
... I tried to write script in perl but the sript was giving funny values and wasted 3 hrs. I didn't want to put the scipt coz that sript doesn't make any sense.
...
|
Ah, the glorious messiness of
Perl:
Code:
$
$ perl -ne 'split; $x{$_[1]}=$x{$_[1]}."\t".$_[0]; END{foreach $k(keys %x){print $k,"\t",$x{$k},"\n"}}' input.txt
XXXXXXX a1 a2 a71
ZZZZZ a30 a13 a43 a23
YYYYYYYYY a6 a62
$
$