Advertisement
Guest User

Untitled

a guest
Nov 8th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. chip@chip:~/watchmaking$ cat holes.pl
  2. #!/usr/bin/perl
  3. use POSIX;
  4. open(FP, "<holes");
  5. while($hole = <FP>)
  6. {
  7. chomp $hole;
  8. print "$hole:\n";
  9. for($i=2; $i<$hole; $i++) {
  10. print "\t$i\n" if isdigit ($hole/$i); }
  11. }
  12. chip@chip:~/watchmaking$ ./holes.pl > holes_able
  13. Calling POSIX::isdigit() is deprecated at ./holes.pl line 8, <FP> line 1.
  14. chip@chip:~/watchmaking$ cat holes_able
  15. 51:
  16. 3
  17. 17
  18. 53:
  19. 55:
  20. 5
  21. 11
  22. 57:
  23. 3
  24. 19
  25. 59:
  26. 63:
  27. 3
  28. 7
  29. 9
  30. 21
  31. 65:
  32. 5
  33. 13
  34. 67:
  35. 69:
  36. 3
  37. 23
  38. 71:
  39. 75:
  40. 3
  41. 5
  42. 15
  43. 25
  44. 77:
  45. 7
  46. 11
  47. 79:
  48. 82:
  49. 2
  50. 41
  51. 86:
  52. 2
  53. 43
  54. 92:
  55. 2
  56. 4
  57. 23
  58. 46
  59. 96:
  60. 2
  61. 3
  62. 4
  63. 6
  64. 8
  65. 12
  66. 16
  67. 24
  68. 32
  69. 48
  70. 100:
  71. 2
  72. 4
  73. 5
  74. 10
  75. 20
  76. 25
  77. 50
  78. 360:
  79. 2
  80. 3
  81. 4
  82. 5
  83. 6
  84. 8
  85. 9
  86. 10
  87. 12
  88. 15
  89. 18
  90. 20
  91. 24
  92. 30
  93. 36
  94. 40
  95. 45
  96. 60
  97. 72
  98. 90
  99. 120
  100. 180
  101. 366:
  102. 2
  103. 3
  104. 6
  105. 61
  106. 122
  107. 183
  108. chip@chip:~/watchmaking$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement