Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: testing parts of a string against a word database

by Eliya (Vicar)
on Dec 01, 2011 at 00:16 UTC ( #940973=note: print w/ replies, xml ) Need Help??


in reply to testing parts of a string against a word database

The problem is that you're trying to iterate through the filehandle NOUNS multiple times without reopening or resetting the file pointer to the beginning of the file.

So either use seek, or change the nesting of the loops so that you just have to go through the file once, i.e.

while (<NOUNS>) { foreach my $element (@senElements) { ... } }


Comment on Re: testing parts of a string against a word database
Download Code
Re^2: testing parts of a string against a word database
by Rudolf (Monk) on Dec 01, 2011 at 00:21 UTC
    Ah, a rookie mistake it seems. Thank you for your time Eliya!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (7)
As of 2014-08-23 07:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (172 votes), past polls