-
@{[0..10]};
-
ref {1..10};
-
map {2*$_} (1..4)
-
grep { $_ % 2 } (1..5)
-
grep {$_ = 5} (1..3)
-
'the fat cat sat on the mat' =~ /([cat]+)/g
-
{ map { $_ => 1 } qw/foo bar baz/ }
-
map {2*$_} grep {/../} (1,5,15,100)
-
grep {/../} map {2*$_} (1,5,15,100)
-
sort map {2*$_} (1..5)
(10,8,6,4,2)
(2,4,6,8,10)
(10,2,4,6,8)
(2,10)
-
length(grep {$_>10} (1..15))
-
scalar(grep {$_>10} (1..15))
-
@a[1,3,1,2,0,2] = (1..6); @a
-
@a{1,2,9,6,2,6}=(1..6); sort keys %a
(1,2,3,4,5,6)
ERROR
(1,2,6,9)
(1,2,2,6,6,9)
-
ref bless {}, "xpto"