Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Detect * in arguments (STDIN)

by tye (Sage)
on Jul 10, 2015 at 21:17 UTC ( [id://1134265]=note: print w/replies, xml ) Need Help??


in reply to Detect * in arguments

If you can't get your users to put the string in quotes (sounds like that would indeed be a problem), then instead of expecting the string on the command line of your script, have the script read the string. Instead of:

% your_script the string from the user that should not contain * char +acters

Have them use your script like:

% your_script Enter string> the string from the user that shouldn't contain * charac +ters

(Wait until a user enters a contraction instead of a "*" using your old invocation strategy.)

- tye        

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2024-04-23 19:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found