in reply to conditional print. Is correct to use it?
In my opinion, the only thing to do with unexpected values is die:
# ... but something forrible happens instead... die "Expected a value for fo" unless defined($fo) and length($fo);
Hard crashes have a way of getting fixed quickly. Anything else tends to cause odd behavior that is hard to track down.
Note: $fo is initiaslized to an empty string. Use just my $fo; do declare an uninitialized (undefined) value.
In response to "we have 8 beans", ($fo + 0 || 8) is parsed as ($fo + (0 || 8)) due to precedence. Update: silly me, ignore this.
Good Day,
Dean
In Section
Seekers of Perl Wisdom