############################################################ #FIRST script: main_program.pl #!/usr/bin/perl use Getopt::Long; use Time::ParseDate qw(parsedate); use Time::Local; use POSIX qw(strftime); our ($GSX, $ASX, $TRACE, $SWITCHNAME, $FILENAME); GetOptions ( "g" => \$GSX, "a" => \$ASX, "t" => \$TRACE, "s=s" => \$SWITCHNAME, "f=s" => \$FILENAME ) or USAGE (); sub USAGE { print "USAGE: $0 -[ag] -f \n\n"; print "DESCRIPTION:\n"; print "\t -a : Defined ASX file type\n"; print "\t -g : Defined GSX file type\n"; print "\t -f : Assigned input file\n\n"; print "EXAMPLE:\n"; print "\t # $0 -a -f 1000001.ACT\n"; print "\t - Processed file name 10000001.ACT with ASX file type.\n"; print "\n"; print "\t # $0 -g -f 1000001.ACT\n"; print "\t - Processed file name 10000001.ACT with GSX file type.\n"; exit; } $SWITCHNAME = uc($SWITCHNAME); require "2.configuration_file.pl";