sunadmn has asked for the wisdom of the Perl Monks concerning the following question:
Good day all I am still pretty new to perl and just really starting to get my feet wet, so I was wondering how I would correctly write a script to look for command line options to run a certain sub routine.
What I would like to be able to do is write a script that can be very interactive with the user. I would like to have the script print out a question and then depending on the answer the user gives run a certain part of the script.
-Stephen
Here we would do some sort of test I guess to ensure what part of the code would be ran. This is the part I guess I am most unsure about. Any advice you may offer here would be great.print "What file do you want to edit?\n"; $file = <STDIN>; chomp($file);
-Stephen
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Calling options via Sub Routines
by dragonchild (Archbishop) on Sep 18, 2003 at 20:35 UTC | |
Re: Calling options via Sub Routines
by sri (Vicar) on Sep 18, 2003 at 20:45 UTC | |
Re: Calling options via Sub Routines
by davido (Cardinal) on Sep 18, 2003 at 22:11 UTC | |
Re: Calling options via Sub Routines
by Roger (Parson) on Sep 18, 2003 at 23:43 UTC | |
Re: Calling options via Sub Routines
by yosefm (Friar) on Sep 19, 2003 at 10:25 UTC |
Back to
Seekers of Perl Wisdom