Advertisement
gmatht

Parse Eve Epic Arc Info

Jun 10th, 2022
1,627
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.57 KB | None | 0 0
  1. use strict;
  2.  
  3. my %begin_count;
  4. my %deliver_count;
  5. my %abrv=qw(
  6. S SistersOE
  7. S5 SoE/Soc5
  8. M Minmatar
  9. C Caldari
  10. G Gallente
  11. GS Gallente/Synd
  12. Gu Guristas
  13. A  Amarr
  14. AS Amarr/Sansha
  15. An Angel
  16. );
  17.  
  18. while (<>) {
  19.     s/\r//g;
  20.     if (/(.*):(.*)-->(.*)/ ){
  21.         foreach (split(/ /,$2)){
  22.             $begin_count{$_}++;
  23.         }
  24.         foreach (split(/ /,$3)){
  25.             $deliver_count{$_}++;
  26.         }
  27.     }
  28. }
  29.  
  30. for(sort(keys %abrv)) {
  31.     if(defined $begin_count{$_} or defined $deliver_count{$_}) {
  32.         print "$abrv{$_}\t-- ".($begin_count{$_}+0)."x Begin\t-- ".
  33.             ($deliver_count{$_}+0)."x Deliver\n";
  34.     }
  35. }
  36.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement