texuser74 has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I have a plain ascii text file sorted alphabetically.
e.g.
AA for apple
A for apple
BB for ball
B for ball
C for ....
i need to insert :A: before the first line that starts with A, similarly :B:, :C: ...till :Z:. Only at the first occurance of A, B and so on.
i.e. my out put should be like
:A:
AA for apple
A for apple
:B:
BB for ball
B for ball
:C:
C for ....
:E:...
:Z:...
Z for Zebra
Please help me
janitored by ybiC: Retitle from "Find", balanced<tt>'s around example text for legibility
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Find
by Roger (Parson) on Nov 26, 2003 at 08:54 UTC | |
by sgifford (Prior) on Nov 26, 2003 at 09:34 UTC | |
by texuser74 (Monk) on Nov 26, 2003 at 09:30 UTC | |
by Roger (Parson) on Nov 26, 2003 at 09:46 UTC | |
by texuser74 (Monk) on Nov 27, 2003 at 02:53 UTC | |
by duff (Parson) on Nov 26, 2003 at 15:19 UTC | |
|
Re: Find
by Abigail-II (Bishop) on Nov 26, 2003 at 09:28 UTC | |
|
Re: Find
by l3nz (Friar) on Nov 26, 2003 at 09:00 UTC | |
|
Re: Find
by Anonymous Monk on Nov 26, 2003 at 09:04 UTC |