in reply to defined and value is 0
Hello redtux,
This line:
if (!(defined $opt,$hash{$file}->{$opt})){
is probably not doing what you expect. From Comma Operator:
Binary "," is the comma operator. In scalar context it evaluates its left argument, throws that value away, then evaluates its right argument and returns that value. This is just like C's comma operator.
As hippo has shown, you want a logical AND (i.e., &&) here rather than a comma.
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: defined and value is 0
by redtux (Sexton) on Jul 06, 2020 at 15:37 UTC |