Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: First time using Args

by mmusser (Initiate)
on May 03, 2012 at 17:34 UTC ( [id://968784]=note: print w/replies, xml ) Need Help??


in reply to Re: First time using Args
in thread First time using Args

Fascinating. In Programming class, we were taught that <> = <STDIN>. I didn't know they were actually different. Thanks very much for your help :). I could write this without asking for user input...the only problem was that one of the args would be a string that may contain spaces, and I'm not sure how best to handle that. Make the user enter that argument with quotes?

Replies are listed 'Best First'.
Re^3: First time using Args
by JavaFan (Canon) on May 03, 2012 at 17:57 UTC
    In Programming class, we were taught that <> = <STDIN>.
    That's wrong. <> is shorthand for <ARGV>.
    I could write this without asking for user input...the only problem was that one of the args would be a string that may contain spaces, and I'm not sure how best to handle that. Make the user enter that argument with quotes?
    Quotes, or backslashes should work in all shells that I know off. (The spaces are special to the shell, Perl has nothing to do with that).

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2024-03-28 14:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found