Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: Whats its bad here?

by Sombrerero_loco (Beadle)
on Sep 25, 2009 at 12:40 UTC ( [id://797486]=note: print w/replies, xml ) Need Help??


in reply to Re: Whats its bad here?
in thread Whats its bad here?

i only receive as warning:
Global symbol "$vTemp2" requires explicit package name at C:\directori +o_creator.cgi line 29.
im still founding anything that can help me.

Replies are listed 'Best First'.
Re^3: Whats its bad here?
by Corion (Patriarch) on Sep 25, 2009 at 12:43 UTC

    That's no warning, that's an error message. Your program doesn't even start, because Perl found an error in it.

      YUp, if i disable use strict it works, and if i print the var $vTemp2 its shows me the correct info.... Its a weird thing.

        That's what use strict; is for. It forces you to predeclare your variable names, so it can catch mistyped variable names. If you predeclare $vTemp2 like this:

        use strict; my $vTemp2; ...

        your program will work and you get the benefit of Perl alerting you when you mistype the name.

        if i disable use strict it works
        But, that is the wrong thing to do. You should use strict, then fix the errors. Read use strict and warnings.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2024-04-19 01:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found