[WEB4LIB] RE: VERY strange Perl problem

Darryl Friesen Darryl.Friesen at usask.ca
Thu Jan 6 16:35:56 EST 2000


> I don't know if this helps you specifically Dan but others might be
> interested in Y2K and PERL issues.

[snip]

> The
> problem was that the two digit date field for the year started yielding
> "100".  I found this out on 1/5/100. It was very puzzling since
> everything was "verified" as "compliant".

Seems like the person who "verified" your system didn't know much about
Perl.  As you found out, Perl (and specifically the localtime functoin) is
Y2K compliant, it just doesn't return what most people expect.


As for Dan's problem re: telnet...

Have you tried a similar expect script from one of your Unix boxes as yet
another check?  That might help to indicate whether it's Perl/net::telnet or
not.

I don't claim to be any sort of expect expert (I need the book by my side
nearly every step) but something like this should do it:


#!/usr/local/bin/expect

set env(TERM) vt100

send_error "Attempting to open session..."
set timeout 30
spawn telnet moondog.usask.ca
expect {
   "lgin:" {
      send_error "\n\nGot login prompt!!\n\n"
      # Ctrl-D to quit at the login prompt
      send "\004"
    }
    timeout {
        send_error "\n\nFailed to get login prompt\n\n"
    }
}
exit 1



- Darryl

 ----------------------------------------------------------------------
  Darryl Friesen, B.Sc.                        Darryl.Friesen at usask.ca
  Programmer/Analyst                            http://gollum.usask.ca/
  Consulting & Development, Computing Services
  University of Saskatchewan                   "The Truth Is Out There"
 ----------------------------------------------------------------------





More information about the Web4lib mailing list