Help for this page
my $line = <$sock>;
while ( my $line = <$sock> ) { #more stuff }
sub sendCommands{ ... } }