use strict; use POSIX; use File::Basename; use Time::Local; use Benchmark; use DBI; my $BASE_DIR = "E:\\Backup\\Scripts"; my $EXPORT_DIR = "E:\\Backup\\Export"; my $perl_program = $^X; my $perl_script = $0; my $basename = basename($perl_script,".pl"); $ENV{'ORACLEDB_HOME'}= $ARGV[0]; $ENV{'ORACLE_SID'}= $ARGV[1]; ... ... ... and so on for the scripts to do other stuff ... based on the supplied argument ... ... there is no sub-routines of any kind, this script ... just do what it's told to do in a sequence of commands ... :-) ... ...