in reply to Re: Don't re-read file for each new pattern...
in thread Don't re-read file for each new pattern...

You have provided an excellent "walk through" of the TIMTOWTDI choices, and why the Llama's suggested script is superior.I'm very grateful for your help!

Since you mentioned the IO::Prompt module, I downloaded it to try. The script you provided:

use IO::Prompt; while (my $word=prompt 'Please enter a word: ', -while => qr/\S/) { print "You entered '$word'\n"; }
...gives me the following error:

Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/site_perl/5.8.8/IO/Prompt.pm line 91.

What should I make of that?