#!/usr/bin/perl -w ## USAGE: switch.plinto ARGV ## switch.pl start ## use strict; use Switch; print "ARGV=@ARGV\n"; switch ( $ARGV[0] ) { case /[a-zA-Z0-9]\@sutechy\.com/ { print "CASE: email\n"; } case 17 { print "CASE: number 17\n"; } case /^brian$/ { print "CASE: brian\n"; } case "start" { print "CASE: start\n"; } case "stop" { print "CASE: stop\n"; } case /[a-z]/ { print "CASE: lc char\n"; } case /[A-Z]/ { print "CASE: uc char\n"; } else { print "USAGE: UNKNOWN, NEED VALUE\n"; } } exit(0);