sub readprompt { my $prompt = shift; print $prompt if -t STDIN; <>; } while (my $i=readprompt(">>")) { print "You said: $i\n"; } #### --- print map { my ($m)=1<