Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
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 cooling their heels in the Monastery: (9)
As of 2014-08-01 03:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (256 votes), past polls