in perl, there are three data types
1)scalar
my $animal ="camel";
my $amswer = 42;
2) arrays
my @animals =("camel","llama","owl");
my @numbers = (23,42,69);
my @mixed = ("camel",42,123.56);
3)hashes
my %fruit_color = ("apple","red","banana","yellow");
my %fruit_color =(apple=>"red",banana =>"yellow",);
No comments:
Post a Comment