Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: testing parts of a string against a word database

by Eliya (Vicar)
on Dec 01, 2011 at 00:16 UTC ( [id://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) { ... } }

Replies are listed 'Best First'.
Re^2: testing parts of a string against a word database
by Rudolf (Pilgrim) 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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://940973]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2024-04-24 06:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found