in reply to Replacing charecters in files
You can escape apostrophes (') and backslashes (\) this way:
If you do want to strip some characters, like semicolons and quotes, in the most straightforward manner, you can do:$file =~ s/([\\'])/\\$1/g;
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.$file =~ tr/";//d;
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. :)
|
|---|