------
> > 
> > # file already sorted by $id
> > my $cur_id = '';
> > while (<F>) {
> >     chomp;
> >     ($id,$score,$bal) = split (/,/, $_);
> >     next if $cur_id == $id;
> >     print OUT "$id,$score,$bal\n";
> >     $cur_id = $id;
> > }
> 
> Don't fix it if it's not broken.  :-)
> 
> 


Thanks John and Jeff.  Just thought there may be a better way. 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to