[Za-pm] Re: perldoc

Sean Carte scarte at pan.uzulu.ac.za
Fri Jun 6 00:38:57 CDT 2003


On Thu, 2003-06-05 at 16:08, Nick Cleaton wrote:
> On Thu, Jun 05, 2003 at 03:30:14PM +0200, Sean Carte wrote:
> > > 
> > >   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' ) );
> 
> Try mine - no warning.

I still get a warning when I run the script:

Use of uninitialized value in string eq at test_script.pl line 24.

I think the critical difference is in my first line:

#!/usr/bin/perl -w

I always enable warnings (and use strict).
-- 
Regards
Sean Carte

University of Zululand
Network Services Unit
Phone: 035 902 6081
Fax: 035 902 6028

"Good evening. Last week we learned how to saw a lady in half. This week
we're going to learn how to saw a lady into three bits and dispose of
the body ..."




More information about the Za-pm mailing list