[Za-pm] Re: perldoc
Sean Carte
scarte at pan.uzulu.ac.za
Thu Jun 5 08:30:14 CDT 2003
On Thu, 2003-06-05 at 15:25, Nick Cleaton wrote:
> 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 ?
Exactly.
> How about replacing those 3 lines with:
>
> exec 'perldoc', $0 if "@ARGV" eq '--help';
Nice. But I'll keep my warning prevention:
exec 'perldoc', $0 if ( $ARGV[0] and ( $ARGV[0] eq '--help' ) );
--
Regards
Sean Carte
University of Zululand
Network Services Unit
Phone: 035 902 6081
Fax: 035 902 6028
"Always look on the bright side of life..."
More information about the Za-pm
mailing list