in reply to Re^5: undef/defined &{$name} while "strict refs"
in thread undef/defined &{$name} while "strict refs"
When we execute my code above, the script throws an exception because &{ 'run' } violates "strict refs". Khen1950fx explained how to avoid this problem (I appreciate his suggestion).
On the other hand, when we comment out &{ 'run' }, my script doesn't output error messages. This result shows the following doesn't violate "strict refs":It seems each line uses symbolic references. I don't understand why this is possible.my $walkable = defined &{ 'walk' }; undef &{ 'walk' };
In Section
Seekers of Perl Wisdom