replace:
$row->[15] = ''; if ($row->[5] =~ /#[^ ]+/) { ($row->[15]) = $row->[5] =~ /(#[^ ]+)/; }
with (untested):
($row->[15]) = $row->[5] =~ /(#[^ ]+/ ? $row->[5] : '';more readable, logically? same line as above, but split across a few lines:
($row->[15]) = $row->[5] =~ /(#[^ ]+/ ? $row->[5] : '';
ternary (aka. conditional) operator.
In reply to Re^4: Initialize or Match undef without warning
by stevieb
in thread Initialize or Match undef without warning
by JobC
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |