in reply to Substituting data

as kvale said, unless you actually want a literal \a at the beginning, then do:
$line =~ s/^/\\a/;
i don't see why you'd want either one of them there, so i don't know which one you want.