go ahead... be a heretic | |
PerlMonks |
Re^3: Accessing 2nd level elements in XML::Simple and using the data in an SNMP callby radiantmatrix (Parson) |
on Jul 31, 2007 at 14:01 UTC ( [id://629835]=note: print w/replies, xml ) | Need Help?? |
I don't think strict does what you think it does. There's no need to pre-declare variables or functions (subs) in Perl. However, strict will complain about you using global variables without explicit package names. All you have to do is use lexically-scoped variables. It does this for very good reasons. Or, in other words, when you first use a variable, use my:
When we advocate use strict;, we do so with good reason and as a result of vast experience. Personally -- I've been screwed over a few times because I was too lazy to work with strict in place. And vicariously -- we've all helped folks solve problems that would have been entirely avoided with the use of strict and warnings. So please, use strict; use warnings; -- it really will help you learn good Perl more quickly!
<–radiant.matrix–>
Ramblings and references The Code that can be seen is not the true Code I haven't found a problem yet that can't be solved by a well-placed trebuchet
In Section
Seekers of Perl Wisdom
|
|