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

Your Solution 1 is fabulous, i am adopting it

many thanks

raj

Replies are listed 'Best First'.
Re: Re: Re: Find
by Roger (Parson) on Nov 26, 2003 at 09:46 UTC
    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? ;-)

      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