in reply to Simple Noob Question
These all do the same:
!defined and $_ = ' ' for @$row;
for (@$row) { !defined and $_ = ' '; }
for (@$row) { if (!defined) { $_ = ' '; } }
for $_ (@$row) { if (!defined($_) { $_ = ' '; } }
for my $i (0..$#$row) { if (!defined($row->[$i]) { $row->[$i] = ' '; } }
In 5.10 and above, that could have been written
$_ //= '' for @$row;
|
|---|