Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Global symbol requires explicit package..

by Eily (Hermit)
on Jan 21, 2014 at 18:12 UTC ( #1071502=note: print w/ replies, xml ) Need Help??


in reply to Global symbol requires explicit package..

use strict; generates errors for some features / construct that are judged unsafe. More info on that in strict. And you can look at perldiag for more information on what the error messages mean.

For exemple, the first one means :

(F) You've said "use strict" or "use strict vars", which indicates that all variables must either be lexically scoped (using "my" or "state"), declared beforehand using "our", or explicitly qualified to say which package the global variable is in (using "::").
You should declare $lim before using it. With a my $lim, for exemple.

The second one means that since there are no quotes around 'linux', it should (because of strict) be interpreted by Perl as a function and not a string, but there's no function called linux in your code. If you want a string, write "linux".


Comment on Re: Global symbol requires explicit package..
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2014-09-17 00:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (54 votes), past polls