- RU.PERL ----------------------------------------------------------- RU.PERL - Msg : #5587 [620] От : Anton Potekhin 2:5020/400 01 февраля 05, 16:24 Кому : Konstantin Tokar 12 февраля 05, 20:59 Тема : Re: array ------------------------------------------------------------------------------- From: "Anton Potekhin"Hello, Konstantin! You wrote to Anton Potekhin on Tue, 1 Feb 2005 12:55:07 +0000 (UTC): KT> use strict; KT> my %words; KT> while (<>) { KT> chomp; KT> my @words = split /\s+/; KT> map { $words{$_}++; } @words; KT> } ## end while (<>) KT> while ( my ( $word, $count ) = each %words ) { KT> print "$count\t'$word'\n"; KT> } ## end while ( my ( $word, $count... что значит $words{$_}++; ? With best regards, Anton Potekhin. E-mail: anton@orbita1.ru --- ifmail v.2.15dev5.3 * Origin: Demos online service (2:5020/400)