Thanks for the suggestions. Your help was much appreciated. I ended using
"book" =>\$book, instead of book=s in my code.
After that my script no longer expected the string, which is good news.
Thanks to you both for helping me with that. I can continue
to script away again :)
-T
> >
> >
> >
--On Tuesday, September 23, 2003 18:10 -0700 Trina Espinoza
<[EMAIL PROTECTED]> wrote:
Hey Perl Peps,
I am stuck in the mudd and hoping someone can give me a few clues
that will help get me back on track.
I want to submit some arguments like so:
./script1.pl -book -title HP3 -chapter 04
NOTE:
> Since I want to treat -book like a boolean
The problem is that you are telling Getopt::Long that "book" expects a
string value:
> "book=s" =>\$book,
This is untested, but this should work.
> "book" =>\$book,
It sets the value of $book to 1 if the option is present.
See the Getopt::Long docs