perlinacan has asked for the wisdom of the Perl Monks concerning the following question:
but it doest work. to extract a team list I was trying the follwoing#!/usr/bin/perl # #Program to check and return 10 players score from a large list # # $file = 'score'; # file in format player,score $player = 'player' ; #file in format player open(INFO,"$score" ); #open file with 100 players and scores open(INFO2, "$player" );# Open the file with 10 players to get thier s +cores $index = 0; @total = (<INFO>); while (<INFO2>){ @score = split(/[,]/,$_); if ($total[$index] == $score[0]) { print "$total[$index] , $score[0] ,\n"; $total++; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: help with extracting data
by grep (Monsignor) on Apr 16, 2002 at 05:28 UTC | |
|
Re: help with extracting data
by Ovid (Cardinal) on Apr 16, 2002 at 05:53 UTC | |
|
Re: help with extracting data
by graff (Chancellor) on Apr 16, 2002 at 06:12 UTC | |
by graff (Chancellor) on Apr 16, 2002 at 06:20 UTC | |
|
Re: help with extracting data
by Anonymous Monk on Apr 16, 2002 at 06:34 UTC |