while (1) { Engine::doHeatbeat; chomp (my $input = ); # Trim right / left white character $input =~ s/^\s+|\s+$//g; given ($input) { Engine::Parser::Command($input); } }