Created
February 10, 2018 16:38
Star
You must be signed in to star a gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1 sub scan { │··········· | |
| 2 say " - Scanning for new posts"; │··········· | |
| 3 $latest = 0; │··········· | |
| 4 for dir('posts') -> $file { │··········· | |
| 5 $latest++ if !$file.basename.starts-with('.') && $file.basename.ends-with('.html'); │··········· | |
| 6 } │··········· | |
| 7 @titles = Nil; │··········· | |
| 8 loop (my $i = $latest; $i > 0; $i--) { │··········· | |
| 9 @titles[$latest - $i] = "posts/$i.html".IO.lines[0]; │··········· | |
| 10 } │··········· | |
| 11 } | |
| Unhandled exception in code scheduled on thread 4 │··········· | |
| Failed to open file /root/blog/posts/1.html: Too many open files |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment