0: #!/usr/local/bin/perl -w
1:
2: use strict;
3: use LWP::Simple;
4:
5: $_ = get("http://classics.mit.edu/Lao/taote.mb.txt")
6: or die "The page that can be fetched is not the true page\n";
7: my $chapter = 1 + int(81 * rand());
8: my $end =
9: $chapter == 37 ? '\n-------' :
10: $chapter == 81 ? '\nTHE' :
11: ('\nChapter\s+' . ($chapter + 1). '\s*\n');
12: /^(Chapter\s+$chapter\s*\n.*?(?=$end))/ms && print $1;
In reply to Fetch some meditation material by TheoPetersen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |