Index: RenameVariable.pm
===================================================================
--- RenameVariable.pm	(revision 9173)
+++ RenameVariable.pm	(working copy)
@@ -136,7 +136,7 @@
                 $node->{content} =
                   substr( $node->content(), 0, 1 ) . $replacement;
             }
-            if ( $type eq '@' and $node->isa("PPI::Token::ArrayIndex") )
+            elsif ( $type eq '@' and $node->isa("PPI::Token::ArrayIndex") )
             {    # $#foo
                 return 0
                   unless substr( $node->content, 2 ) eq substr( $varname, 1 );
