in reply to Creating a text index for a text file
This stuff prints:use strict; my %aq = map ( (lc ((/^:(.):/) ? $1 : $_) => $_) , <DATA>); foreach my $k ( sort keys %aq ) { print $aq{$k}; } __DATA__ D for Donkey B for Box B for Bubble C for Cat A for Alpha :A: :B: :C: :D:
Hope this is what you were looking for.:A: A for Alpha :B: B for Box B for Bubble :C: C for Cat :D: D for Donkey
|
|---|