in reply to detecting an undefined variable
This smells like an XY problem ...
Since - like haukex already explained - hard coded variables must already be declared at compilation time under strict, there are not many possible use cases...
Do you use strict, eval , my or our ?
Most likely you just need to check a hash key $opt{scale} for existences with exists ...
... or just definedness
my $myscale = $opt{scale} // 1;
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
FootballPerl is like chess, only without the dice
|
|---|