1 2 3 4 5 6 7
#! /usr/bin/perl @rocks = qw /limesone quartz graphite/; print "how many kinds of rocks do you have ?\n"; print "I have ",scalar @rocks," kinds of rocks.\n";
1 2
how many kinds of rocks do you have ? I have 3 kinds of rocks.