in reply to Replacing charecters in files

You probably don't want to strip them, but escape them, because, if you strip them, you do damage the information. Anyway, whatever you do, you should do it by modifying $file before inserting it in that string.

You can escape apostrophes (') and backslashes (\) this way:

$file =~ s/([\\'])/\\$1/g;
If you do want to strip some characters, like semicolons and quotes, in the most straightforward manner, you can do:
$file =~ tr/";//d;
But likely, you may be wanting a smarter way of processing the data, and use some clever s/// trick. However, I have no idea on what is a generally acceptable format for all cases.

p.s. Please don't use @f[15], use $f[15] instead. If you ran this script with warnings enabled, you'd get a warning about it. Perhaps it works, but my rule of thumb is that you should only use the "@" syntax only when in list context — it is used in scalar context, here. Perl may disagree and never like array slices (because that's what you used) of just one item, so that's where we disagree. :)