Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re: Get hangman words from text file

by kennethk (Abbot)
on Dec 04, 2012 at 22:31 UTC ( #1007165=note: print w/replies, xml ) Need Help??

in reply to Get hangman words from text file

The error Global symbol "@hangman" requires explicit package name... means that whatever code you are actually running is using strict but does not declare @hangman, perhaps via my or our. You can use diagnostics if you need more clarity on an error message. See Use strict warnings and diagnostics or die. Basic debugging checklist wouldn't hurt either.

Seeing as your demo code does not emit any errors and there is no such mention in the "along the lines of" code, you need to post the code you are actually running, so we can provide guidance. Your posted code is grossly in line with what you need to do, though my open would likely look more like open my $fh, '<', 'words.txt' or die "Open fail on words.txt: $!\n";

#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1007165]
[Corion]: A good daystart everybody!

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2018-01-23 08:36 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (241 votes). Check out past polls.