in reply to DBI, s/// => unitinitialized value in substitution

The earlier thread includes the answer. In addition, you never initialize @rex, and thus never initialize either your match or replacement expressions.
  • Comment on Re: DBI, s/// => unitinitialized value in substitution