^ means normally means "beginning of string", not "beginning of line". The m modifier changes that. (See perlre.) That gives you two options:
$TheFile =~ s/^'//mg;
and
while (my $TheLine = <>) { $TheLine =~ s/^'//; ... }
Update: You probably want to use '.* instead of just ' unless you only want to delete the '.
In reply to Re: removing comments
by ikegami
in thread removing comments
by dhudnall
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |