in reply to help with "use strict" and code organization

This snippet compiles without errors:
#!/usr/bin/env perl use warnings; use strict; my $savegame; print "#---------mRFLoYDFrEAK42's---------#\n"; print "| DOOM Log Parser |\n"; print "#----------------------------------#\n\n"; if (defined $savegame) { print "Game saved $savegame times.\n\n"; }

and prints:

#---------mRFLoYDFrEAK42's---------# | DOOM Log Parser | #----------------------------------#

Perhaps you could reduce your code to just a few lines, including the my declarations, and show us your exact error messages. When debugging, I always find it useful to reduce my code to the fewest lines possible to still get the error messages.

Replies are listed 'Best First'.
Re^2: help with "use strict" and code organization
by MrFloydFreak42 (Novice) on Apr 24, 2008 at 01:15 UTC
    The error messages output by perl are along the lines of: Global symbol "$whatever" requires explicit package name at ......... They all have a big file location at the end. This has to do something with strictures but all my variables are defined with my.