Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: Get hangman words from text file

by rjt (Deacon)
on Dec 04, 2012 at 22:34 UTC ( #1007166=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
    open my $file, '<', 'words.txt' or die "Can't open words: $!";
    my @listOfWords = (<$file>);
    chomp @listOfWords;
    close $file;