On 14 Jan 2023 21:43, Jacob Bachmeyer wrote:
[...]
You could also exploit that || short-circuits in the shell and replace
the "if" block with " $PERL ... || sleep='sleep ''2' ". This allows you
to directly execute a command on a false result and (I think) it is
portable, too. (I half-expect someone to correct me on that along the
lines of "the shell on Obscurix has a bug where || implicitly uses a
subshell".)
personally i find (ab)use of `||` and `&&` tends to lead to unmaintainable code.
i.e. it tends to produce write-once-read-never code akin to most perl. so if
the construct has been in use already and isn't causing issues, i'd use it.