in reply to Passing Variables to External Subroutines (Perl/Tk)

"use warnings;" gives a clue as to the cause of this behaviour.

The problem is fixed by using
our $b = 'blue';
instead of "my".

"An our declaration declares a global variable that will be visible across its entire lexical scope, even across package boundaries. "

Offense, like beauty, is in the eye of the beholder, and a fantasy.
By guaranteeing freedom of expression, the First Amendment also guarantees offense.

  • Comment on Re: Passing Variables to External Subroutines (Perl/Tk)