use feature 'signatures'; my $on = 0; sub switch_lamps ($switch_to) { state $lamp_state = 0; return if $lamp_state == $switch_to; $lamp_state = $switch_to; # ... } sub is_nighttime { #... } while (1) { switch_lamps( $on && is_nighttime() ); sleep(60); }
In reply to Re: Efficiency of indoor grow light timer
by holli
in thread Efficiency of indoor grow light timer
by stevieb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |