aded a pop function to the pages to help prevent short or blank pages.
This commit is contained in:
parent
f918b39f5a
commit
86f6396bdb
3
books.pl
3
books.pl
@ -206,6 +206,9 @@ for ( my $l; $l < $number_of_pages; $l++){
|
||||
# pull out a random chapter from that book
|
||||
my $chapter_select = int(rand($chapter_list));
|
||||
|
||||
# pop off the last page, as it may be blank, or short
|
||||
pop @{$books[$book_list]{'pages'}[$chapter_select]};
|
||||
|
||||
# get the number of pages in the chapter
|
||||
my $page_list = @{$books[$book_list]{'pages'}[$chapter_select]};
|
||||
# pull out a random page from the chapter
|
||||
|
Loading…
x
Reference in New Issue
Block a user