I have a bit of a stupid question - I'm trying to use 'strict', and it's giving me headaches...

Hmm, I'm sorry, but stupid questions are especially forbidden (tsk tsk).

Watch me "bold" some key words (ok)

I have a variable that is returned by a function in another file (@in, in function ReadParse from the well-known cgi-lib.pl). Without strict, I can just execute &ReadParse, and use $in{'...'}; but with strict, it expects me to declare this variable. If I declare it locally in my perlscript (my (@in);) then it uses a different variable (which is logical, it declares a new one in the scope of the current function which 'overwrites' the other var)... So how do I use a variable from a included library-file if strict is on?
You only see errors, when you use strict, so ... What is this strict?

Does it have documentation? And more importantly, does that documentation say anything useful?

The error message that "it" expects you to declare this variable, so .... What are all the ways you can think of declaring a variable?

Where would you read about declaring variables?

What would you have done without perl monks? Hopefully start asking these questions yourself.

After which, you should've stumbled accross perldata and strict, and read like a mad man. In case you didn't stumble accross those, then you need to read How To Read The Friendly Manual which very nicely outlines numerous perl resources, as well as general strategy for finding the answers you're looking for.

Peace! Start communication ;)

update: Great. I would like to point out however, and I did not provide the exact answer as many others have (what would be the point?)

 
______crazyinsomniac_____________________________
Of all the things I've lost, I miss my mind the most.
perl -e "$q=$_;map({chr unpack qq;H*;,$_}split(q;;,q*H*));print;$q/$q;"


In reply to (crazyinsomniac: questions) Re: strict expects me to declare this variable by crazyinsomniac
in thread strict problem by december

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.