programming-examples/perl/Array/Arrays- a collection of similar data elements.pl

8 lines
189 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
@name=("A", "B", "C", "D");
@list=(2..10);
@grades=(100, 90, 65, 96);
@items=($a, $b, $c);
@empty=();
$size=@items;
@mammals = qw/dogs cats cows/;
@fruit = qw(apples pears peaches);