Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: help with "use strict" and code organization

by Cody Pendant (Prior)
on Apr 24, 2008 at 02:35 UTC ( #682546=note: print w/replies, xml ) Need Help??


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

One possible reason for this problem is that you've defined them using my, but you've defined them in the wrong place.

For instance, if you've done

if($foo){ my $bar = 'baz'; } print $bar;
Then you'll get the warning that $bar is undefined, because it only exists inside the "if" block.

In other words, just adding my anywhere you declare a variable isn't going to solve your strict problems. You have to know what it means for those variables.



Nobody says perl looks like line-noise any more
kids today don't know what line-noise IS ...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://682546]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2020-07-08 10:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?