Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: article processer

by lyklev (Pilgrim)
on Oct 08, 2010 at 21:16 UTC ( [id://864280]=note: print w/replies, xml ) Need Help??


in reply to article processer

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://864280]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2024-04-20 01:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found