in reply to Best way to sort these strings ? recursive way ? use Parse::RecDescent?
(or put "\t" in place of the multiple spaces that precede "desc" and "PRED" in the string you pass to "print".for ( sort keys %data ) { my $pred = join( ', ', @{$data{$_}{pred}} ); print "$_ desc $data{$_}{desc} PRED $pred\n"; }
|
|---|