Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^3: Piping a script with prompts into less (edit script)

by tye (Cardinal)
on Oct 19, 2012 at 02:37 UTC ( #999848=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub prompt {
        my( $prompt, $validator, $reprompt ) = @_;
    ...
    
        return $response;
    }
    
  2. or download this
            last
                if  $validator->( $response );
    
  3. or download this
        prompt(
            "Knarfle the garthog? ",
            sub { shift(@_) =~ /^[yn]/i },
            "Yes or no? ",
        );
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2014-12-21 02:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (101 votes), past polls