
riscphree
New User
Jun 5, 2007, 8:57 PM
Post #1 of 3
(1069 views)
|
|
Replacing Double quotes
|
Can't Post
|
|
I've got a file with lines like this (my test file has just 4 lines of data): "90001","+33.973951","-118.248405","LOS ANGELES","CA","LOS ANGELES","STANDARD" And I want to just make the quoted entries comma seperated instead of with quotes. So I wrote this:
#!/usr/bin/perl -w open(FILEIN, "quotes.txt"); open(FILEOUT, ">quotesout.txt"); while(<FILEIN>){ print FILEOUT $variable =~ tr/"//d; } close(FILEOUT); close(FILEIN); But my quotesout.txt file gives me 4 zeroes (one for each line?). Any suggestions or hints?
|