siddheshsawant has asked for the wisdom of the Perl Monks concerning the following question:
I guys, I have a question about perl's defined loop.I have written a following code:
sub not_exposed_reason { my ($self, $not_exposed_reason) = @_; $self->{_not_exposed_reason} = $not_exposed_reason if defined($not +_exposed_reason); return $self->{_not_exposed_reason}; }
When there is no exposed reason I wants to return "No exposed reason" string. My question how to return it?
Kindly let me know...Thanks in advance !!!!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Question about defined loop
by ssandv (Hermit) on Mar 11, 2010 at 17:13 UTC | |
by siddheshsawant (Sexton) on Mar 11, 2010 at 17:59 UTC | |
| |
|
Re: Question about defined loop
by ikegami (Patriarch) on Mar 11, 2010 at 17:28 UTC | |
|
Re: Question about defined loop
by JavaFan (Canon) on Mar 11, 2010 at 17:10 UTC | |
|
Re: Question about defined loop
by mje (Curate) on Mar 11, 2010 at 17:04 UTC | |
by JavaFan (Canon) on Mar 11, 2010 at 17:06 UTC | |
by mje (Curate) on Mar 11, 2010 at 17:12 UTC |