in reply to Re^2: Attempting to fill a hash
in thread Attempting to fill a hash
Your file has most likely been written on Windows, and you're reading it on Unix... You could run
$ perl -i.bak -pe 's/\r$//' your-wordlist.file
to remove the extraneous carriage returns.
Alternatively, filter the file through the crlf PerlIO layer when reading it (as it does happen on Windows by default), i.e.
open my $wordhandle, "<:crlf", $wordfile or die ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Attempting to fill a hash
by chrism01 (Friar) on Jun 06, 2008 at 05:22 UTC | |
|
Re^4: Attempting to fill a hash
by TwistedTransistor (Novice) on Jun 06, 2008 at 02:23 UTC |