Lucas Rey has asked for the wisdom of the Perl Monks concerning the following question:
sub promptUser { local($promptString,$defaultValue) = @_; print $promptString; $| = 1; $_ = <STDIN>; chomp; return $_; } while (1) { $command = &promptUser("ABC> "); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Permanent prompt waiting for user command
by haukex (Archbishop) on Dec 03, 2022 at 07:30 UTC | |
by Lucas Rey (Sexton) on Dec 03, 2022 at 07:38 UTC | |
by haukex (Archbishop) on Dec 03, 2022 at 07:41 UTC | |
by Lucas Rey (Sexton) on Dec 03, 2022 at 07:45 UTC | |
by haukex (Archbishop) on Dec 03, 2022 at 07:58 UTC |