in reply to Use of Uninitialized value in substitution (s///)

I had the same problem and just fixed it! The problem is the initial assignment of the variables.

e.g.

my $status = $myhash{'key1'}; $status =~ s/\t/ /g;

will give an error IF the value of $myhash{'key1'} is not defined.

This was my fix:

my $status = $myhash{'key1'} || ''; $status =~ s/\t/ /g;

no more error!