in reply to Simple Q: Make it prompt for a variable

Unless I'm missunderstanding you, you want to read from stdin. Do so with the standard readline function or operator: <>, like
$|=1; #majick print "Please enter data:\n"; my $data = <STDIN>;

Replies are listed 'Best First'.
Re^2: Simple Q: Make it prompt for a variable
by chromatic (Archbishop) on Jul 11, 2004 at 23:34 UTC

    What is the purpose of the unbuffering there?

      Actually ya know what, I'm not sure it has a point. I was just thinking about cases dealing with trying to read and print to stdout/in and some times having problems with the "prompt" not being printed until you read from stdin.

        It just seemed like an odd thing to add. I'm not sure if there's any sensible OS that buffers STDOUT by default if you print a newline to it.