# In the server script sub process { ... print $new_sock <) !~ /^123/ ) { push @output, $line; } print $sock "BYE\n"; }