XP is just a number | |
PerlMonks |
Re: defined and value is 0by Athanasius (Archbishop) |
on Jul 06, 2020 at 14:14 UTC ( [id://11118971]=note: print w/replies, xml ) | Need Help?? |
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,
In Section
Seekers of Perl Wisdom
|
|