Dear friend,
Check the defined method.It always return boolean value.. 
If values already defined it will return "true(1)" else "false".
 If $option is not define it will take the file name and assigned to that variable..
If already defined it will return 1. So u will get 1 as a value..

In reply to Re: checking $option by leslie
in thread question about getopt by Sun751

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":