in reply to Separating 'real' errors from ..err.. 'unreal'?

Normally this error occurs when the scalar you are performing the subsitution on has no content. So for example:
my $tech; $tech =~ s/a/b/;
... will result in the error. To get around it you can do the following:
my $tech; $tech =~ s/a/b/ if defined $tech;
I hope that helps.