#!/usr/bin/perl -ws # minus-ess.pl use strict; # if we run it ./minus-ess.pl -switch "foo" it should be defined. my $switch = "hooray" unless (defined $switch); print $switch;