Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^3: Whats its bad here?

by Corion (Patriarch)
on Sep 25, 2009 at 12:43 UTC ( [id://797489]=note: print w/replies, xml ) Need Help??


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

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

Replies are listed 'Best First'.
Re^4: Whats its bad here?
by Sombrerero_loco (Beadle) on Sep 25, 2009 at 12:44 UTC
    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://797489]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2024-04-24 22:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found