Ok, the following works.

<code>
#!ruby

require 'net/telnet'

l_prompt = "Documents and Settings"
#

tn = Net::Telnet.new( 'Host' => 'matilda',
                       'Telnetmode'=>true,
                       'Prompt' => />$/m ) { |s| puts s }

tn.waitfor(/login:/i) { |s| puts s }
tn.puts('Testing'){|s| puts s}

tn.waitfor(/password:/i) { |s| puts s }
tn.puts('password'){|s|puts s}

#this line is MS specific
tn.waitfor( /Welcome/i ) { |s| puts s }

tn.cmd( 'dir' ){|s| puts s}
tn.close

exit 0
</code>

So the module was not picking up on the prompts.  I thought the Prompt 
variable was to specify what I wanted my prompt to look like, not the 
prompt which the module looks for to determine EOT.  Properly setting 
the Prompt value makes the 'cmd' function work.  But I still have to do 
the login manually.  Also, I have to have the correct Prompt value for 
each machine/user/os.

Am I doing something wrong?

Thanks,

~S