/[pgestraier]/trunk/data/convert.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/data/convert.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 9 by dpavlin, Fri May 20 22:01:19 2005 UTC revision 10 by dpavlin, Wed May 25 23:27:35 2005 UTC
# Line 2  Line 2 
2    
3  use strict;  use strict;
4    
5    # score for words in title
6    my $title_rank = 3;
7    
8  open(my $t, "gzip -cd trivia.list.gz |") || die "can't open trivia.list.gz: $!";  open(my $t, "gzip -cd trivia.list.gz |") || die "can't open trivia.list.gz: $!";
9    
10    
# Line 48  while(<$t>) { Line 51  while(<$t>) {
51                  print "$i ";                  print "$i ";
52                  open(my $t, "> trivia/$i.est") || die "can't open $i.est: $!";                  open(my $t, "> trivia/$i.est") || die "can't open $i.est: $!";
53                  print $t '@title='.$title."\n";                  print $t '@title='.$title."\n";
54                  print $t '@qv='.join(",", @qv),"\n\n" if (@qv);                  print $t 'qv='.join(",", @qv),"\n" if (@qv);
55                  print $t "$trivia\n";                  print $t "\n$trivia\n",
56                  print $t "\t$title\n\t", join("\n\t", @qv),"\n";                          ("\t$title\n" x $title_rank),
57                            "\t", join("\n\t", @qv), "\n";
58                  close($t);                  close($t);
59                  $trivia = '';                  $trivia = '';
60                  @qv = ();                  @qv = ();

Legend:
Removed from v.9  
changed lines
  Added in v.10

  ViewVC Help
Powered by ViewVC 1.1.26