Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Excluding words with more than three a

by Spenser (Friar)
on Dec 20, 2001 at 06:37 UTC ( [id://133382]=note: print w/replies, xml ) Need Help??


in reply to Excluding words with more than three a

How about this:

#!/usr/bin/perl -w use strict; open(WORDS, "<dictionary.txt") || die "Cannot open dictionary file."; foreach(<WORDS>){ if(!/b.*b/ && !/a.*a.*a/ && !/k.*k/ ){ push(@_, $_); } } close(WORDS); print @_,; exit;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-25 16:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found