Perl: the Markov chain saw | |
PerlMonks |
Re: Ternary operators: a hinderance, not a helpby NateTut (Deacon) |
on Aug 10, 2005 at 15:35 UTC ( [id://482627]=note: print w/replies, xml ) | Need Help?? |
I use them a lot when I build SQL:my $Show_Statement = "Show " . ($row->{'TableKind'} eq 'T' ? 'Table' : 'View') . $row->{'DatabaseName'} . '.' . $row->{'TableName'}; I find that method more readable than using an if statement.
In Section
Meditations
|
|