in reply to A looping and format question...
Note that defined() is not commutative with and. defined($x and $y) is not the same as defined($x) and defined($y); they return different results when $x is '' and $y is undef. ('' and undef) returns '', which is defined.
In Section
Seekers of Perl Wisdom