dvd1999 has asked for the wisdom of the Perl Monks concerning the following question:

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

Replies are listed 'Best First'.
Re: article processer
by toolic (Bishop) on Oct 08, 2010 at 16:08 UTC
    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: article processer
by planetscape (Chancellor) on Oct 09, 2010 at 00:11 UTC
Re: article processer
by lyklev (Pilgrim) on Oct 08, 2010 at 21:16 UTC
    open(E,shift @ARGV) or die($!); chomp(@e=<E>); close(E); undef $/; $t=<>; printf("%-20s : %3d\n", "Words:" ,scalar split(' ',$t)); printf("%-20s : %3d\n ", $_, scalar(@a=($t =~ m/$_/mgi))) for @e;

    Good enough to do the work, bad enough to fail a test. As a homework assignment, find out how this works and then rewrite it in a decent way.

    Hint: takes as arguments one file with a list of words/expressions and a list of files to be processed.