in reply to Re: Re: Find
in thread Creating a text index for a text file

No problem. ;-)

By the way, solution 1 can be simplified further -
#!/usr/local/bin/perl -w use strict; my %letter; while (<DATA>) { print, next if /^\s*$/; my $c = substr $_, 0, 1; print ":$c:\n" if ! $letter{$c}++; print; } __DATA__ AA ... A..
Hey, didn't you like my second and third solutions? ;-)

Replies are listed 'Best First'.
Re: Re: Re: Re: Find
by texuser74 (Monk) on Nov 27, 2003 at 02:53 UTC

    i am new to perl. At first glance, i was only able to understand your Solution 1. Rest i am still trying to figure out...

    howz little Albert doing, congrats...

    thanks for all perl monks