in reply to Substituting data

The problem is that you are mixing up regex elements with straight text. Try:
$line =~ s/\t/ /g; $line = "\a" . $line; # simplest # $line =~ s/^/\a/; # alternative using s///
-Mark