Sorting manually generated index using perl script
Posted
by Pradeep Singh
on Stack Overflow
See other posts from Stack Overflow
or by Pradeep Singh
Published on 2010-04-28T14:40:16Z
Indexed on
2010/04/28
14:43 UTC
Read the original article
Hit count: 369
perl
\item Bernoulli measure, 14
\item cellular automata
\subitem Soft, 3, 28
\subitem balance theorem, 23, 45
\item tiles
\subitem tiling problem, 19, 58
\subitem aperiodic tile set, 18, 45
\item Garden-of-Eden -theorem, 12
\item Bernoulli measure, 15, 16, 35
\item cellular automata
\subitem balance theorem, 9, 11, 14
\subitem blocking word, 22, 32
\item Garden-of-Eden -theorem, 32
I have to sort the above index alphabetically using a perl script. Duplicate item or subitem entries should be merged and their numbers should be sorted. The subitems also should be sorted under respective item and their numbers should be also sorted. If same item is repeated in more than one place with subitems all the subitems should be merged under a single item and also subitems should be sorted
© Stack Overflow or respective owner