sub calculateInstruction{ my $n = $ENABLE{'nothing'}; for my $k (keys %STATE){ $n |= $ENABLE{$k} if ($STATE{$k}); } my $instruction = ""; print "Would send $instruction to serial\n"; # $port->write($instruction); # $port->lookclear(); }