in reply to Re: Logical Assignment Op (with Spreadsheet::ParseExcel)
in thread Logical Assignment Op (with Spreadsheet::ParseExcel)

In this case, if $sheet->{MaxRow} doesn't have a non-zero value, it takes the value of $sheet->{MinRow}.
But beware, Perl has a wider view of what constitutes a false value. The following values are all false: Everything else is true. This means that values such as "0.0" or "0e00" are true, not false.

print "undef is ", ( undef ) ? "true\n" : "false\n"; print "0 is ", ( 0 ) ? "true\n" : "false\n"; print "'0' is ", ( '0' ) ? "true\n" : "false\n"; print "'' is ", ( '' ) ? "true\n" : "false\n"; print "' ' is ", ( ' ' ) ? "true\n" : "false\n"; print "'0.0' is ", ( '0.0' ) ? "true\n" : "false\n"; print "'0e00' is ", ( '0e00' ) ? "true\n" : "false\n"; __DATA__ undef is false 0 is false '0' is false '' is false ' ' is true '0.0' is true '0e00' is true

I don't know the specifics of Spreadsheet::ParseExcel, so this may not relevant ;)