Nov 14, 2001, 10:31 AM
Post #1 of 2
How do you prompt for input and use it in your script on the command line? I know it uses argv but I'm not exactly sure how to do it. Say I want the user to specify a directory and that input will be saved as $directory. How would I do that in perl? Also If it could have a default value if there's no input, somthing like:
Prompt for input in command line script
Which directory are your fonts in?[/usr/share/fonts]
And if they hit enter, $directory will be /usr/share/fonts. If they enter somthing $directory will contain whatever they enter.