in reply to Weird Perl Rule I'm Probably Not Following

The argComplex sub changes the values of $real1, because your my is not parenthesized. You need
my ($value1, $real1, $complex1);
to declare the three variables.

Caution: Contents may have been coded under pressure.

Replies are listed 'Best First'.
Re^2: Weird Perl Rule I'm Probably Not Following
by moltar512 (Sexton) on Oct 14, 2005 at 17:13 UTC
    hmm.. okay what was happening before? which of the variables was the my affecting? just the first in the string of variables??
      Yes. my takes a variable or a parenthesized list of variables. You would eventually have located that bug if you had at the top of your program
      use strict; use warnings;
      strict would have complained about variables not being declared, and warnings would have warned you about using things like $s = @var[1].

      Caution: Contents may have been coded under pressure.
Re^2: Weird Perl Rule I'm Probably Not Following
by moltar512 (Sexton) on Oct 14, 2005 at 17:16 UTC
    btw.. you just fixed my problem!! THANKS!!