Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re^2: Set operations

by davido (Cardinal)
on Dec 02, 2014 at 03:36 UTC ( #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).


Log In?

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2021-06-15 00:11 GMT
Find Nodes?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)

    Results (66 votes). Check out past polls.