R. Joseph Newton wrote:
> Dan Muey wrote:
> > >
> > >       use:
> > >        if ( defined $ARGV[0] && ....)
> >
> > Thanks that did it!
>
> Whoops!  Should have read this before I posted.  Using defined() will capture a
> 0 from STDIN, which could be ameaningful value.  Your suggestion is much better
> than mine on this thread.

Or, more properly,

    if ( exists $ARGV[0] && ....)

or

    if ( @ARGV > 0 && ....)

or ( only in the case of element number zero )

    if ( @ARGV && ....)

any of which which will still issue the warning if the element is there but
has ( presumably through some error ) been set to 'undef'.

Rob








-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to