in reply to Re: ptkdb: 'my' variable in sub retains value between calls
in thread ptkdb: 'my' variable in sub retains value between calls

Thank you all. The variable names are just for an example, of course I used a proper names in my program, it is more than 2000 lines, I don't think I would manage elsewhere.
  • Comment on Re^2: ptkdb: 'my' variable in sub retains value between calls

Replies are listed 'Best First'.
Re^3: ptkdb: 'my' variable in sub retains value between calls
by GrandFather (Saint) on Aug 10, 2008 at 22:53 UTC

    $foo and $bar are good time honored place holder names for variables and are almost as easy to type as $a and $b.


    Perl reduces RSI - it saves typing
Re^3: ptkdb: 'my' variable in sub retains value between calls
by Anonymous Monk on Aug 11, 2008 at 02:16 UTC
    If, in addition to using warnings with its very helpful message referred to in other replies, you had been using strict, Perl would never have let you make the mistake in the first place if you were using names other than $a and $b!