in reply to Reading in Block
my $speaking = 1; my $speaker, %words; for (<>) { chomp; s/^\s+//; s/\s+$//; if ( /\-\-\-/ ) { $speaking = !$speaking; } elsif( $speaking ) { $words{ $speaker } += scalar split( /\s+/ ); } else { $_ and $speaker = $_; } }
One world, one people
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Reading in Block
by toolic (Bishop) on Feb 24, 2011 at 14:30 UTC | |
|
Re^2: Reading in Block
by TomDLux (Vicar) on Feb 24, 2011 at 15:28 UTC | |
by anonymized user 468275 (Curate) on Feb 24, 2011 at 16:57 UTC |