in reply to '||' vs 'or' with subroutines
although I think it's more clear to use or for flow-control things like this.(@foobar = foo()) || warn "Yikes!";
Update: Diotalevi's explanation is more clear, but mine is not "wrong". It is a matter of context being imposed on the output of foo() by the ||. or would put the (result of the) assignment in scalar context, which doesn't affect the assignment itself.
|
|---|