Advertisement
Guest User

Untitled

a guest
Apr 15th, 2021
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. #Golf tentative
  2.  
  3. #!/usr/bin/env raku
  4. my %vmis_pts{Any};
  5. %vmis_pts = (
  6. '30_22-44_76' => 1,
  7. '31_12-47_16' => 1,
  8. '41_22-44_76' => 1,
  9. '130_22-44_77' => 1,
  10. '30_22-44_78' => 1,
  11. '30_22-44_79' => 1,
  12. '30_2-14_76' => 1,
  13. '3_22-44_36' => 1,
  14. '30_21-44_96' => 1,
  15. '80_29-42_66' => 1,
  16. '100_20-44_76' => 1,
  17. '300_21-24_71' => 1,
  18. '39_2-4_73' => 1,
  19. );
  20.  
  21. my Str @strings = (
  22. 'fkdslqfj',
  23. 'jkfdfds',
  24. 'yuirefd',
  25. 'vcxbwn',
  26. 'jfdkslfdsds',
  27. 'fjdkslmfd',
  28. 'rztea yea',
  29. 'opfshffdad',
  30. 'fdsfdff',
  31. 'jfdsfd',
  32. 'qsdjkmyuozer',
  33. 'oeyfjglh',
  34. 'fswvnpmkgd',
  35. 'sufogkjdgsfdydf',
  36. );
  37. my $n = 0;
  38. for %vmis_pts.keys -> $k {
  39. my $match = $k.match(/^ \d+ '_' (\d+) '-' \d+ '_' (\d+) $/);
  40. if $match {
  41. %vmis_pts{@strings[$n++]} = 1;
  42. }
  43. }
  44.  
  45.  
  46. say %vmis_pts;
  47.  
  48.  
  49.  
  50. Ramdomly i get this error:
  51.  
  52. Invocant of method 'match' must be a type object of type 'Any', not an
  53. object instance of type 'ForeignCode'. Did you forget a 'multi'?
  54. in block <unit> at ./bug_memoire.raku line 37
  55.  
  56. What is strange is randomly!!!
  57.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement