in reply to Attempting to fill a hash

You want to change:

while (<$wordhandle>) {

To:

while (my $deadstring = <$wordhandle>) {

Replies are listed 'Best First'.
Re^2: Attempting to fill a hash
by TwistedTransistor (Novice) on Jun 06, 2008 at 00:31 UTC
    that still gave me an empty hash, the problem is not reading the text from the file (I successfully filled out an array using the same code) It's just that when I try to put into the hash it fails. Am i using the right method to edit the hash after it's already been declared.
Re^2: Attempting to fill a hash
by chromatic (Archbishop) on Jun 06, 2008 at 06:42 UTC

    Why?

    chomp will work on the underinitialized $_, and that assignment line will assign effectively zero to $deadstring. How will that help?