Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: Set operations

by davido (Cardinal)
on Dec 02, 2014 at 03:36 UTC ( [id://1108911]=note: print w/replies, xml ) Need Help??


in reply to Re: Set operations
in thread Set operations

Though he's probably not allowed to use CPAN in his course work, it's too bad. Because if he could, he would be able to use IO::Prompt::Tiny or IO::Prompt::Hooked to simplify the prompting for input. In fact, though it's like calling in the artillery when a fly swatter is needed, ExtUtils::MakeMaker is a core module, and comes with the prompt function.

use ExtUtils::MakeMaker 'prompt'; my $value = prompt "Please enter something.", "asdf"; print "$value\n";

The first argument is what to say to the user. The second argument is what default to assume if the user just hits enter (or if there's no terminal).


Dave

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1108911]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-04-19 06:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found