Dan Muey wrote:
> if you do use strict; and a -w switch and you use $ARGV[0]
> it says "use of uninitiated value at line ..." if $ARGV[n] is empty
> 
> What do I need to do with @ARGV or $ARGV[n] to make it not give that
> message? 
> 
> 
> #!/usr/bin/perl -w
> use strict;
> 
> if($ARGV[0] =~ /\d/) { print "$ARGV[0] has a number in it\n"; } #
> line 4 print "HI";
> 
> #OUTPUT
> 
> ./test.pl
> Use of uninitialized value at ./test.pl line 4.
> HI
> ./test.pl hi7
> hi7 has a number in it
> HI

        use:
         if ( defined $ARGV[0] && ....)
Wags ;)


**********************************************************
This message contains information that is confidential
and proprietary to FedEx Freight or its affiliates.
It is intended only for the recipient named and for
the express purpose(s) described therein.
Any other use is prohibited.
****************************************************************


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

Reply via email to