View Problem

Rotate a list

Given a list ["apple", "orange", "grapes", "bananas"], rotate it by removing the first item and placing it on the end to yield ["orange", "grapes", "bananas", "apple"]
DiskEdit
perl
@list = qw(apple, orange, grapes, bananas);
push @list, shift @list;
DiskEdit
perl
@list = qw(apple orange grapes bananas);
@list = @list[1..$#list,0];
ExpandDiskEdit
cpp C++/CLI .NET 2.0
fruit->Add(fruit[0]); fruit->RemoveAt(0);
ExpandDiskEdit
cpp
rotate(fruit.begin(), fruit.begin()+1, fruit.end());
ExpandDiskEdit
csharp 2.0 (LinkedList), 3.0 ("var" keyword)
var lst = new LinkedList<String>(new String[] {"apple", "orange", "grapes", "banana"});
lst.AddLast(lst.First());
lst.DeleteFirst();

Submit a new solution for perl, cpp, or csharp
There are 18 other solutions in additional languages (clojure, erlang, fantom, fsharp ...)