Answers to the Problem of the Week

Matt Heusser mattandap at allegan.net
Tue Oct 5 07:20:42 CDT 1999


Bill Gathen was the first person to answer the
problem correctly, @ around 11:00 or so monday morning.

He wrote:
>It makes a socket connection to the date/time server 
>(port 13) on the local box (loopback address 127.0.0.1) 
>you run it on.
>show date/time
>or how about
>show local date/time?
>Close enough?


The 'two or three words' I was looking for were some
combination of 'tcp socket client datetime', so Bill gets
the prize.

Joel Muelenberg answered the problem correctly about
an hour later, and David Hoppe at 5:30PM.  

Originally, $org was "daytime(13)", but I changed it to
just 13 because that works, too.  So, some of the $org=~s//g
type statements lost all meaning, but it still worked.  ;-)

Of course, since the {print} statement was the last 
statement before the end of a structure block, the semi-colon
isn't needed, and it works just fine without it.  (Learning 
Perl, 2nd ed, page 5, little asterisk at the bottom of the 
page.)  But it sure was a nice red herring ...

I hope this was a good lead-up to our November discussion
of socket programming .... oh, and I call the power reference
next month.  ;-)


Matthew R. Heusser
President, Grand Rapids.PM    -> http://grand-rapids.pm.org

"...Those who insist on entitlements from the state
     become enemies of the State instead."
     - Dr. Tim Kimmel, Author & Popular Speaker




More information about the grand-rapids-pm-list mailing list