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

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.

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

    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.

Re^5: Whats its bad here?
by toolic (Bishop) on Sep 25, 2009 at 13:05 UTC
    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.