Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Get hangman words from text file

by kennethk (Monsignor)
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.


Comment on Re: Get hangman words from text file
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (9)
As of 2014-09-23 18:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (235 votes), past polls