On 4/3/06, Edward WIJAYA <[EMAIL PROTECTED]> wrote:

> 1. How can I make the code below return man page when I simpy do:
>     $ perl mycode.pl
>
>     Namely no param is passed here.

    unless (@ARGV) {
        # no command-line args
        pod2usage(-verbose => 2);
        exit;
    }

> 2. Verbose 1 status below doesn't return anything when I do:
>     $ perl mycode.pl -help.
>
>     What's wrong with it?

I have no idea what the phrase "Verbose 1 status below" means. Your
code does what I think it should when the '-help' (or '-help.' with a
period) is used. Have you tried the debug option of GetOpt::Long?

> === mycode.pl ======
> !/usr/bin/perl -w

You seem to have lost the initial '#' character.

Hope this helps!

--Tom Phoenix
Stonehenge Perl Training

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to