#!/usr/bin/perl require 5.003; # Example: giving input to a perl script from the command line if ($#ARGV != -1) { # if there are any items on the command line print "\n\n"; for ($J=0; $J <=$#ARGV; $J++) { print " item $J: $ARGV[$J]\n"; } print "\n Thanks for the input.\n\n"; sleep 2; # sleep 2 means to pause for 2 seconds } else { print "\n\tThere was no input on the command line. Try typing: ./input-cl.pl My name is Melinda \n\n"; }