Jeffro Tull has asked for the wisdom of the Perl Monks concerning the following question:
sub write_results { if($regtype eq "biz") { open (RESULTSDB, ">>$datadir/databases/bizresults\.dat") || di +e "Cannot open bizresults\n"; $writebiz = "$complogin|$first|$last|$email|$test_taken|$test_ +score"; chomp ($writebiz); print RESULTSDB $writebiz; } elsif ($regtype eq "ind") { open (RESULTSDB, ">>$datadir/databases/indresults\.dat") || di +e "Cannot open indresults\n"; $writeind = "$username|$test_taken|$test_score"; chomp ($writeind); print RESULTSDB $writeind; }#end If foreach $sorted_row2 (@sorted_rows) { ($number_missed2, $report_category_name2) = split (/\|/,$sorte +d_row2); chomp($number_missed2, $report_category_name2); $foreach = "|$report_category_name2|$number_missed2"; chomp ($foreach); print RESULTSDB $foreach; }#end foreach print RESULTSDB "\n"; close (RESULTSDB); }
company|first|last|email@email.com|test taken|score|Edit Commands |7|Settings |6|Dimensioning |4|Draw Commands |4|Coordinate Systems |3|Grip editing |2|Text Commands |2|File Commands |2|Layers |2|Selection Sets |2|Hatching |1|Utilties |1|Plotting |1|Inquiry Commands |1|Display |1|Block Commands |1
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: File Writing and newline
by strat (Canon) on Feb 06, 2002 at 14:22 UTC | |
|
Re: File Writing and newline
by talexb (Chancellor) on Feb 06, 2002 at 14:22 UTC | |
|
Re: File Writing and newline
by redsquirrel (Hermit) on Feb 06, 2002 at 15:15 UTC | |
|
Re: File Writing and newline
by jlongino (Parson) on Feb 06, 2002 at 16:43 UTC | |
|
Re: File Writing and newline
by Speedy (Monk) on Feb 06, 2002 at 18:00 UTC | |
by particle (Vicar) on Feb 06, 2002 at 18:10 UTC |