use strict; use warnings; use File::Basename; use Getopt::Long; my $iam = basename $0; my $syntax = qq{ syntax: $iam [switches] Welcome to '$iam' -- the fabulous tool for doing [insert function description here]. Switches: -v ... display verbose output }; # Process switches with Getopt::Long here my $dir = shift or die $syntax;