http://qs1969.pair.com?node_id=355555

shamala has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to telnet using pel script
#!/usr/bin/perl 2 print "enter the name the machine you want to telnet\n"; 3 chomp(my $mac=<STDIN>); 4 $addr=join "",$mac,".rest.of.the.address"; #or $addr=$mac . ".rest.of .the.address"; 5 print "$addr\n"; 6 `telnet $addr`; 7 print "\n"; 8 print "login name\n"; 9 print "password\n";

but this isnt working..well why not??.

  • I am trying telnet $addr (then a newline on the STDIN)
  • pushing my login name on the STDOUT by doing the print
  • and the my password
  • donno why this isnt making sense to the interpreter or if its my script thats not making sense?? any help coming this way??

    thanks in advance

    shamala

    20040523 Edit by Corion: Changed title from 'Why wouldnt this work??'