sub calculateInstruction{ my $instruction; if($STATE{'lights'} && $STATE{'bell'}){ $instruction = "" }elsif($STATE{'lights'}){ $instruction = "" }elsif($STATE{'bell'}){ $instruction = "" }else{ $instruction = "" } print "Would send $instruction to serial\n"; # $port->write($instruction); # $port->lookclear(); }