From: Rafael Garcia-Suarez Date: Fri, 13 Jul 2007 06:12:50 +0000 (+0000) Subject: Silence mandatory warning by using @# instead of $#. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1a9b3510845e2cb6cf6cf76ef71e4c5a6d9d3b67;p=p5sagit%2Fp5-mst-13.2.git Silence mandatory warning by using @# instead of $#. "no warnings" is probably a bit inappropriate for a base test. Putting -X on the command-line is probably not a good idea, since it may hide other interesting warnings in the future. p4raw-id: //depot/perl@31601 --- diff --git a/t/base/lex.t b/t/base/lex.t index 984cdff..464e68b 100755 --- a/t/base/lex.t +++ b/t/base/lex.t @@ -7,7 +7,7 @@ $x = 'x'; print "#1 :$x: eq :x:\n"; if ($x eq 'x') {print "ok 1\n";} else {print "not ok 1\n";} -$x = $#; # this is the register $# +$x = $#[0]; if ($x eq '') {print "ok 2\n";} else {print "not ok 2\n";}