in reply to Question about defined loop

defined is not a loop, it is a function. That may sound pedantic, but it's difficult to help people who use words wrong, because it's hard to understand them.

One of many ways to do what (I *think*) you want would be to make the last line
return defined($not_exposed_reason)?$self->{_not_exposed_reason}:"No e +xposed reason";
which uses the ? : construct (sometimes called the ternary conditional operator) to produce the value before the : if the condition before the ? is true, and the one after the : if the condition is false. I'm not entirely sure how helpful that is, because your question is pretty hard to parse.

Replies are listed 'Best First'.
Re^2: Question about defined loop
by siddheshsawant (Sexton) on Mar 11, 2010 at 17:59 UTC
    Thanks a lot dude!!!!!Thats helped out .....
    A reply falls below the community's threshold of quality. You may see it by logging in.