Perl replace backslash
Hi all,
Any ideas why this code will not open the file and replace the backslashes? Trying to do a .csv import into a DB and the \, is screwing it up if it occurs in the file. I have tried about 10 different ways to remove the \ from the data file. If this is the correct way to remove backslashes, am I not rewriting the file correctly? Thanks! Code:
|
I think you want instead:
Code:
open UPLOADFILE, ">$upload_dir/$filename"; Code:
open UPLOADFILE, ">$upload_dir/$filename"; If you indeed do want to replace them with something else, do this: Code:
open UPLOADFILE, ">$upload_dir/$filename"; Code:
open UPLOADFILE, ">$upload_dir/$filename"; |
That did help, thanks, I did not realize it was that easy to do the replacement while writing the file.
|
All times are GMT -5. The time now is 06:52 AM. |