my $in; while (local $_ = <>) { chomp; $in = $_, last if /\S/; } print "You said: $in\n";