- or download this
>perl -wMstrict -le
"print 'before: ', defined S() ? S() : 'undefined';
...
"
before: undefined
after: 42
- or download this
>perl -wMstrict -le
"print M::get_x();
...
"
42
42
- or download this
package M;
...
sub cannot_access_x { return $y; }
1;