C:\> telnet localhost 20203 C:\> telnet localhost 20203 #### #!/usr/bin/winperl use warnings; use strict; use base 'Net::Server'; sub process_request { print "Hello.\r\n"; warn "Foo.\n"; # This line causes an error dialog to pop up with the # following message under Win2k: # The instruction at "0x28073fc9" referenced memory at "0x01fc2da0". # The memory could not be "read". "string" =~ /(.)/; warn "Got $1\n"; sleep 10; print "Goodbye.\r\n"; } # Auto-flush STDOUT and STDERR my $old = select(STDOUT); $|=1; select(STDERR); $|=1; select($old); # Start the server main->run();