if ($date) { date(); } #### if ($date) { $when = date($date); } #### sub format_date_mdy { my($date) = @_ my $dt = parsedate($date); return strftime("%m%d%y", localtime($dt)); } #### login($command, $login, $password); sub login { my($command, $login, $password) = @_; ... } #### my $job = shift or die "Need a job name"; #### my $job = shift or pod2usage( -message => "Need a job name", -verbose => 0, -exitval => 1, ); #### if ($options{t}) { if ($job && $queue && $date && $time) { print "At $time on $when, this will run $job in queue $queue. \n"; } elsif ($job && $queue && $date) { print "Please enter a time for the job to run. \n"; # Shouldn't we be exiting at this point? } elsif ($job && $queue) { print "This will run $job in queue $queue immediately with the -n flag \n"; } elsif ($job eq "install") { print "OK\n"; } else { print "Please specify a Job Name and Queue \n"; # Shouldn't we be exiting at this point? } }