I heartily encourage you to stick with strict and -w.
It can feel like a real pain at first to get used to them.
It can seem like they are just getting in your way. But
the warnings they produce are telling you that you have
numerous latent or actual errors in the way you are doing
things.
They will catch a lot of errors for you
and your work will go much better once you get the knack
and you will wonder how you ever got anything done
without them.
In this case it is going to require you to rework how
you make values available in your subroutines. But your
code will be much more robust and easy to maintain once
you get it strict/-w compliant.
It is hardest when you have to convert a sizable chunk of
non-strict/w code that
(almost) works the way you want. When you start out
on a new project with strict and -w things go much easier.
So call it penance, bite the bullet, face the music, clean
things up, and get on with life as a better programmer
trusting that your pals 'use strict' and '-w' will help
you avoid errors that lesser beings still struggle with.
Programming is hard enough. We need all the help we can
get.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.