#!/usr/bin/perl -w use strict; use Getopt::Std; getopts('hd:t'); my ($num_days, $dait, $today); # local vars used later my ($opt_h, $opt_d); # vars from Getopt::Std # if I don't use my() here I get the following #Global symbol "$opt_h" requires explicit package name at ./checklogs.pl line 12. #Global symbol "$opt_d" requires explicit package name at ./checklogs.pl line 13. # I tried Getopt::Std::$opt_h and it didn't like it either. # if ( $opt_d ) { $num_days = $opt_d; } print ("num_days = $num_days\n");