Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Stopping bad input (harder than sanitizing)

by swl (Parson)
on Mar 08, 2021 at 07:11 UTC ( [id://11129319]=note: print w/replies, xml ) Need Help??


in reply to Stopping bad input (harder than sanitizing)

If $search->get() is returning undef on <RET> then change the condition in the goto line so it avoids an infinite loop.

It's probably also useful to autoflush stdout to see the feedback as it is generated, rather than once the buffer is sufficiently full. See https://perldoc.perl.org/perlvar#$%7C.

# somewhere in your code, perhaps in the search sub itself. local $| = 1;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2024-03-29 05:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found