As others have pointed out, someone is adding use strict; to your code. This is a good thing and something that should always be done. It catches a lot of the errors that you may have in your code.
However, check your book and make sure it talks about the my
and our
commands. If it does, I'd go ahead and stick with the book. It's a beginner book, and is probably just getting you use to coding a few simple things without a lot of the magic incantations you use in Perl. The idea is to get you to write things like:
$x = 4;
print "Your number is $x\n";
And that's fine for now. Get you use to things. Give you confidence, draw you in, slowly, carefully, much like an angler fish draws in it's prey. It's okay... Perl is easy... Don't worry about a thing... There's nothing confusing about it... No need to run away before it's too late...
Then, SNAP! And, they'll be teaching you real Perl.
For now, if you don't want to put my
everywhere, just so your coding examples match the book, put these two statements on the top of your program:
no strict;
no warnings;
This will shut down those two pragmas and let you get to following your book.
It's just like turning off the Emergency Backup System in a Nuclear Power plant. Now you can concentrate and not have to listen to all those annoying sirens going off all the time.