in reply to using $ARGV without arguments

Because the 0th element of @ARGV is empty and therefore uninitialized. To supress the warning just check if @ARGV has been populated e.g
if(@ARGV and $ARGV[0] eq 'TEST') { print "$ARGV[0]\n"; }
See. perlvar for more info on @ARGV.
HTH

_________
broquaint

update: 'pritn' ne 'print', thanks to particle