You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this use case, $x becomes undef. I doubt it matters why, but as an example, reading an expected numerical value from an external database can cause it if the code return is empty.
Then a choice has to be made : create another database with not-null values, or assign a value of '0' (zero) in Perl, thus :
< if ($x[$k] eq '') {$x[$k] = 0}>
where $k is a variable that sets an index to the array @x.
When the code is run, a warning is returned for each undefined value.
This isn't necessarily a problem, as the warnings can be ignored, but I would prefer to be able to set a flag to temporarily prevent the warning message being thrown.
The text was updated successfully, but these errors were encountered:
https://perlmaven.com/use-of-uninitialized-value
In this use case, $x becomes undef. I doubt it matters why, but as an example, reading an expected numerical value from an external database can cause it if the code return is empty.
Then a choice has to be made : create another database with not-null values, or assign a value of '0' (zero) in Perl, thus :
< if ($x[$k] eq '') {$x[$k] = 0}>
where $k is a variable that sets an index to the array @x.
When the code is run, a warning is returned for each undefined value.
This isn't necessarily a problem, as the warnings can be ignored, but I would prefer to be able to set a flag to temporarily prevent the warning message being thrown.
The text was updated successfully, but these errors were encountered: