simple dictionary maker - give him plain text file and he will return a dictionary derived from it...
open T,$ARGV[0];for(<T>){$_=lc;y/[a-z]/ /cs;push@l,split}close; @l=sort(split/:/,join"\n:",grep(!$s{$_}++,@l));open T,">dict"; print T for@l;close

Replies are listed 'Best First'.
Re: dictionary maker
by Aristotle (Chancellor) on Mar 01, 2003 at 15:14 UTC
    Why not use Perl's shortcuts? I also don't understand why you're fiddling with split and join there.
    @w{map { $_=lc; y/[a-z]/ /cs; split } <>}=(); print map "$_\n", sort keys %w;

    Makeshifts last the longest.

A reply falls below the community's threshold of quality. You may see it by logging in.