summaryrefslogtreecommitdiffstats
path: root/perl_checker.src/test/suggest_better.t
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-10-13 08:47:26 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-10-13 08:47:26 +0000
commit7227ed63b1548299c570c30b57e7b45c612b610b (patch)
tree43a0e54034b05aaaf4a4e94f4863cde8ccb262d4 /perl_checker.src/test/suggest_better.t
parenta69658dc4995acef787592b9c50539d7fc2c29c5 (diff)
downloadperl-MDK-Common-7227ed63b1548299c570c30b57e7b45c612b610b.tar
perl-MDK-Common-7227ed63b1548299c570c30b57e7b45c612b610b.tar.gz
perl-MDK-Common-7227ed63b1548299c570c30b57e7b45c612b610b.tar.bz2
perl-MDK-Common-7227ed63b1548299c570c30b57e7b45c612b610b.tar.xz
perl-MDK-Common-7227ed63b1548299c570c30b57e7b45c612b610b.zip
$#x == -1 is better written @x == 0
Diffstat (limited to 'perl_checker.src/test/suggest_better.t')
-rw-r--r--perl_checker.src/test/suggest_better.t2
1 files changed, 2 insertions, 0 deletions
diff --git a/perl_checker.src/test/suggest_better.t b/perl_checker.src/test/suggest_better.t
index 9fc4f1c..4b8d2d5 100644
--- a/perl_checker.src/test/suggest_better.t
+++ b/perl_checker.src/test/suggest_better.t
@@ -60,6 +60,8 @@ $l[$#l] you can replace $#l with -1
$#l == 0 $#x == 0 is better written @x == 1
+$#l == -1 $#x == -1 is better written @x == 0
+
$#l < 0 change your expression to use @xxx instead of $#xxx
$l[@l] = 1 "$a[@a] = ..." is better written "push @a, ..."