#!/usr/local/bin/perl -w use strict; die "Usage: $0 [1 7177 201 201 -a]\n This program will do XYZ, based upon your number. Use -a (this is your switch) to choose all\n" unless @ARGV ==2; if ($ARGV[1] eq "-a") { print "Hey, I'm a switch!\n"; } # and so on........