[Za-pm] Re: perldoc

Nick Cleaton nick at cleaton.net
Thu Jun 5 08:25:07 CDT 2003


On Thu, Jun 05, 2003 at 02:40:52PM +0200, Sean Carte wrote:
> 
> if ( $ARGV[0] and ( $ARGV[0] eq '--help' ) ) {
       ^^^^^^^^^^^^
>   exec('perldoc', $0);
> }

To prevent a warning if there are no arguments, right ?

How about replacing those 3 lines with:

  exec 'perldoc', $0 if "@ARGV" eq '--help';

--
Nick



More information about the Za-pm mailing list