GetOptions(\%opts, 'opt1=s', 'opt2=i',...); $opts{'opt1'} ||= ($ENV{OPT1} || 'default');