This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
NetWare port from Guruprasad S <SGURUPRASAD@novell.com>.
[perl5.git] / t / op / array.t
index d48b5fb..472e02c 100755 (executable)
@@ -1,6 +1,6 @@
 #!./perl
 
-print "1..71\n";
+print "1..72\n";
 
 #
 # @foo, @bar, and @ary are also used from tie-stdarray after tie-ing them
@@ -234,3 +234,16 @@ sub foo { "a" }
 @foo=(foo())[0,0];
 $foo[1] eq "a" or print "not ";
 print "ok 71\n";
+
+# $[ should have the same effect regardless of whether the aelem
+#    op is optimized to aelemfast.
+
+sub tary {
+  local $[ = 10;
+  my $five = 5;
+  print "not " unless $tary[5] == $tary[$five];
+  print "ok 72\n";
+}
+
+@tary = (0..50);
+tary();