/ Published in: Perl

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
sub ask { my($promptString, $defaultValue) = @_; if ($defaultValue) { } else { } $| = 1; # force a flush after our print $_ = <STDIN>; # get the input from STDIN (presumably the keyboard) if ("$defaultValue") { } }
Comments
