Perl Getopt::Long

Hi All

I am using Getopt::Long in perl and i am trying to have it so if i dont supply a switch after the progname is will do a defult option

i have the following

GetOptions($OPT,
    'debug|d',
    'mail|m',
) or info();

i want it run the debug if it is not given a switch

Thanks
A

You could simply do this:

if (@ARGV == 0) { &debug }

sub debug {
    <code>
}