adding comma seperated values from a multi line file and displaying data
- From: "Lyrad" <lyradsr@xxxxxxxxx>
- Date: 5 Apr 2006 11:19:51 -0700
I am a Perl newbie, and I inherited a Survey web page that takes in 19
questions and 1 open comment, and writes the input to a file like this:
1,0,1,0,0,0,0,1,0,0,0,1,1,1,5,5,5,5,5,Boy oh boy you guys are great!
21,1,0,1,0,0,1,0,1,0,0,1,1,1,5,4,3,2,1,You have to work on getting
people skills in order
6,0,0,0,1,1,0,0,0,0,1,1,1,1,1,2,3,4,5,keep up the good work. :)
I need to add all the numbers prior to the first comma, add them
together and display the sum. Ditto for the second column, etc.
The last 5 questions I need to count the number of 5's, 4's, 3's 2's,
and 1's from all the lines in the file, total each of those sums, and
display those numbers on a single line.
Then the comments need to be displayed in paragraphs underneath the
totals.
I also have to display a header to the top of the file:
Number CR's,OPC,Autosys,ENP,Email,Blockpoint,Catia Support,Autosys
Support,Plex 4 Support,CPM Support,No Support Required,Delivery
Time,Support Service,Process Performance,Product Eval,Delivery
Eval,Reliablility Eval,Tech Support Eval,Overall Eval,Comments
Any help would be greatly appreciated!!
.
- Follow-Ups:
- Prev by Date: Re: print a segmant of sequace..
- Next by Date: Re: adding comma seperated values from a multi line file and displaying data
- Previous by thread: print a segmant of sequace..
- Next by thread: Re: adding comma seperated values from a multi line file and displaying data
- Index(es):
Relevant Pages
|