What can you do here?
If you are a beginner, or would like to refresh your Perl programming knowledge,
you can go over the Perl tutorial.
You will find a few advanced articles too, though most of the advanced articles are available to the
subscribers of the Perl Maven Pro service only.
If you are interested to listen to or even see other Perl developers,
the Perl Maven TV Show is a collection of such interviews.
Want to make sure you don't miss any of the Perl Maven articels?
Sign up to the newsletter!
While a lot of people recommend using advanced OOP systems for Perl
such as Moose or Moo, there are many applications that use the
classic OOP system of Perl. If you want or need to understand such
applications, you'd better make yourself familiar with the classic OOP
system of Perl.
Besides, both Moose and Moo are built on top
of the classic system, so understanding it is important to gain better
understanding of what the more high-level OOP systems do.
Getting started with Classic Perl OOP
The built-in rand() function of perl returns a random fractional number
between 0 and 1. 0 included but 1 not. Mathematicians would probably represent the range
of possible numbers with something like this: [0, 1) though, because the
numbers in Perl are limited to some 15 digits after the decimal point the actual
numbers rand() will generated don't cover the whole range.
rand(N) will generated a random number between 0 and N (not including N):
Generate random numbers in Perl with the rand() function