#! /usr/bin/perl # illustrates taking arguments from input # usage: parrot this is a text $number=$#ARGV+1; print "Got $number arguments\n"; for ($i=0; $i<=$#ARGV; $i++) { print "$i is $ARGV[$i].\n"; } foreach $item (@ARGV) { print "The word is: $item.\n"; } foreach (@ARGV) { print "Say: $_.\n"; }