Given the list
[One, Two, Three, Four, Five], fetch the third element (
'Three')
perl qw(One Two Three Four Five)[2];
qw(One Two Three Four Five)[2];
perl @list = qw(One Two Three Four Five);
$list[2];
@list = qw(One Two Three Four Five);
$list[2];
Submit a new solution for
perl
There are 23 other solutions in
additional languages (
clojure,
cpp,
csharp,
erlang ...)