M
Martin Kissner
Hello together,
I have read perldoc perlboot and tried to practice a little.
Now I have a problem with the (redueced) script below.
When I omit "use strict" i get the output of the final print statement
as expected.
With "use strict" I get the error:
Bareword "Sheep" not allowed while "strict subs" in use at
./sheep.pl line 23.
Execution of ./sheep.pl aborted due to compilation errors.
Line 23 is the second from last line.
I do not really know what the error means and I also do not know how to
change the script to make it work with "use strict".
Can anyone give me some explanation and/or point me to the applicable
section of the docs? perldoc -q "strict subs" was not helpful.
Thanks in advance and
Best regards
Martin
I have read perldoc perlboot and tried to practice a little.
Now I have a problem with the (redueced) script below.
When I omit "use strict" i get the output of the final print statement
as expected.
With "use strict" I get the error:
Bareword "Sheep" not allowed while "strict subs" in use at
./sheep.pl line 23.
Execution of ./sheep.pl aborted due to compilation errors.
Line 23 is the second from last line.
I do not really know what the error means and I also do not know how to
change the script to make it work with "use strict".
Can anyone give me some explanation and/or point me to the applicable
section of the docs? perldoc -q "strict subs" was not helpful.
Thanks in advance and
Best regards
Martin