in reply to strict problem
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;" |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (crazyinsomniac: questions) Re: strict expects me to declare this variable
by Anonymous Monk on Mar 20, 2002 at 17:20 UTC | |
|
Re: (crazyinsomniac: questions) Re: strict expects me to declare this variable
by Rex(Wrecks) (Curate) on Mar 20, 2002 at 19:02 UTC |