On 12-04-28 12:10 PM, Jim Gibson wrote:
On Apr 28, 2012, at 9:04 AM, sono...@fannullone.us wrote:
my $host = 'localhost';
if ( defined ($mail_field) and ($mail_field ne '') ) {
$host = $mail_field;
}
I would use:
my $host = $mail_field ? $mail_field : 'localhost' ;
Well, since $mail_field is not likely to be false unless it's undefined:
my $host = $mail_field || 'localhost';
--
Just my 0.00000002 million dollars worth,
Shawn
Programming is as much about organization and communication
as it is about coding.
[updated for today's programmers]
"Show me your code and conceal your interfaces, and I shall continue
to be mystified. Show me your interfaces, and I won't usually need
your code; it'll be obvious."
-- Fred Brooks
Don't be clever; being great is good enough.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/