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 linewhich 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.return defined($not_exposed_reason)?$self->{_not_exposed_reason}:"No e +xposed reason";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Question about defined loop
by siddheshsawant (Sexton) on Mar 11, 2010 at 17:59 UTC | |
|