Help for this page

Select Code to Download


  1. or download this
    my $x = ["hello"];
    my $y = ["world"];
    ...
    print "We have \$x=$x and \$y=$y.\n";
    print "The first element of \$x is '$x->[0]'\n";
    print "The first element of \$y is '$y->[0]'\n";
    
  2. or download this
    my $x = ["hello"];
    my $y = ["world"];
    ...
    
    # BTW here is something that won't work.  Lists are not arrays! :-)
    sub wont_rotate { @_ = @_[1..$#_, 0]; }