in reply to Re: Two simple code style advice questions
in thread Two simple code style advice questions
OK defined as 0? Yuck!
That's as bad as defining TRUE as 0.
It would be far clearer as:
use constant NOERROR => 0; my $errstr = ( $case != NOERROR ? $msg[$case] : "" );
Though I'd skip that conditional statement completely and embed the logic in the data:
$msg[ 0 ] = ''; ... my $errstr = $msg[ $case ];
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Two simple code style advice questions
by blue_cowdawg (Monsignor) on Jan 16, 2013 at 14:50 UTC | |
by runrig (Abbot) on Jan 16, 2013 at 18:53 UTC | |
by BrowserUk (Patriarch) on Jan 16, 2013 at 15:33 UTC | |
by Anonymous Monk on Jan 16, 2013 at 15:01 UTC |
In Section
Seekers of Perl Wisdom