[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Omaha.pm] bad perl - need help - dispatch table
On Wed, 25 Aug 2004 09:43:02 -0500, Terry <td3201@gmail.com> wrote:
> Hello,
>
> I have a very ugly script that simply reads in a file, parses and
> outputs HTML formatted text. See my kludge at the end of the email.
>
> The program is invoked as ./program $option where $option can be a
> number of different things. For this example I will say $option =
> asdf. I am almost embarrassed to post this code cuz I suck so bad
> at this....but that's life.
>
Take a look at using Getopt or Getopt::Long. They should be standard
with your Perl, and they make life easier. Do a "perldoc Getopt" for
more info. A decent page for it is at:
http://www.aplawrence.com/Unix/perlgetopts.html
--
Mike Hostetler
thehaas@binary.net
http://www.binary.net/thehaas