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

Reply via email to