http://www.perlmonks.org?node_id=110981


in reply to GetOpts problem..........I think.........

This line here..
getopts('ed:', \%opts);
the colon means that 'd' takes arguments. If you're not giving it an argument, the value part of the hash is empty.. which in turn means that your if check will return false.

Hope this helps..
Rich