Error in textbook

Patrick Finnigan reported the following error in a comment in the book:


I wanted to report an error in the textbook on page 383 that I ran into with the
past HW. A line near the bottom of the page says:
"$number = int(rand 4); # Computes a random integer 0-4"

This is false, because the rand function in Perl is exclusive. "int(rand 4)"
computes a number between 0 and 3. rand function perldoc:


This is a good example of the usefulness of the online perl documentation at:

Check it out!