in reply to Re: Validating command-line _parameters_ (not options)
in thread Validating command-line _parameters_ (not options)

I tried using
if (!defined ($username) || !defined ($domain))
But I'm still getting the same warnings.

Replies are listed 'Best First'.
Re: Re: Re: Validating command-line _parameters_ (not options)
by John M. Dlugosz (Monsignor) on Sep 15, 2001 at 02:25 UTC
    Maybe the split is causing the warning if ARGV[0] is undefined. Check for the presence of a parameter first!

    make sure @ARGV contains exactly one element.
    split ARGV[0] at the @
    Make sure the split gave you both parts.