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 imbibing at the Monastery: (17)
As of 2015-07-02 18:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (44 votes), past polls