Perl Programming | ||
---|---|---|
Arrays | ||
my @fruits = qw(apple orange grape cranberry); foreach my $fruit (@fruits) { print "We have $fruit juice in the refrigerator.\n"; } Output: We have apple juice in the refrigerator. We have orange juice in the refrigerator. We have grape juice in the refrigerator. We have cranberry juice in the refrigerator. |
||
Previous | http://stuff.mit.edu/iap/perl/ | Next |