Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- chip@chip:~/watchmaking$ cat holes.pl
- #!/usr/bin/perl
- use POSIX;
- open(FP, "<holes");
- while($hole = <FP>)
- {
- chomp $hole;
- print "$hole:\n";
- for($i=2; $i<$hole; $i++) {
- print "\t$i\n" if isdigit ($hole/$i); }
- }
- chip@chip:~/watchmaking$ ./holes.pl > holes_able
- Calling POSIX::isdigit() is deprecated at ./holes.pl line 8, <FP> line 1.
- chip@chip:~/watchmaking$ cat holes_able
- 51:
- 3
- 17
- 53:
- 55:
- 5
- 11
- 57:
- 3
- 19
- 59:
- 63:
- 3
- 7
- 9
- 21
- 65:
- 5
- 13
- 67:
- 69:
- 3
- 23
- 71:
- 75:
- 3
- 5
- 15
- 25
- 77:
- 7
- 11
- 79:
- 82:
- 2
- 41
- 86:
- 2
- 43
- 92:
- 2
- 4
- 23
- 46
- 96:
- 2
- 3
- 4
- 6
- 8
- 12
- 16
- 24
- 32
- 48
- 100:
- 2
- 4
- 5
- 10
- 20
- 25
- 50
- 360:
- 2
- 3
- 4
- 5
- 6
- 8
- 9
- 10
- 12
- 15
- 18
- 20
- 24
- 30
- 36
- 40
- 45
- 60
- 72
- 90
- 120
- 180
- 366:
- 2
- 3
- 6
- 61
- 122
- 183
- chip@chip:~/watchmaking$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement