Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: CSV or HTML?

by InfiniteSilence (Curate)
on Jan 19, 2012 at 04:29 UTC ( #948676=note: print w/replies, xml ) Need Help??

in reply to CSV or HTML?

I ran the code with your output file and I didn't see any single quote before the numbers.

cat input_output.txt Word; count; Unique words;204; Total words;390; mean;1.91176470588235; + variance ;17.0069545059403; sigma;4.12394889710582 ; 45 a; 5 about; 1 acts; 1 all; 1 amid; 1 and; 13 as; 2 ...

Maybe I'm just confused about your problem? BTW, that output isn't any kind of valid CSV I've ever seen. The first line doesn't match any of the other lines.

Celebrate Intellectual Diversity

Replies are listed 'Best First'.
Re^2: CSV or HTML?
by jms53 (Monk) on Jan 19, 2012 at 07:10 UTC

    The first line is slightly different, it gives the column names and then all other data relevant. (not sure if that invalidates my output).

    I tweaked the code to print the variables as '$words{$word}', and then replaced the single quotes to nothing in OpenOffice which then gave correct formatting.

    I was just bizarre because previously, sorting Z-A gave me 918 coming before 16000.

    Thank you very much!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://948676]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (1)
As of 2018-04-23 01:07 GMT
Find Nodes?
    Voting Booth?