in reply to Doublequotes in column

...instead it is displaying on the terminal.

print $FILE2, "$custom{$Uni}\n";

Should be:

print $FILE2 "$custom{$Uni}\n";

That ill-placed comma is an issue.


Dave

Replies are listed 'Best First'.
Re^2: Doublequotes in column
by bluray (Sexton) on Dec 03, 2011 at 05:56 UTC
    Hi Dave, Thanks. I am now getting the result, but still the double quotes ("645632") are seen for the numerals when I open it as a txt file.

      That's because you're performing your transliteration on the value of $Uni, and using it as a hash key, but then when you output to the new file, you're outputting the hash's value as indexed by the key. The value itself started out as $line, and was never altered in your code (aside from being chomped).

      Why not use Text::CSV instead?


      Dave