Mailinglist Archive: opensuse (2234 mails)

< Previous Next >
[SLE] Perl Script
  • From: tabanna@xxxxxxxxxxxxxxx (tabanna)
  • Date: Sun, 19 Sep 1999 01:07:07 -0300
  • Message-id: <37E4535B.9E60130@xxxxxxxxxxxxxxx>



This script will not run ~ any ideas what is wrong with it ?

..........

#Sarandis Papanagnou, FORTHnet SA
#
print "FORTHnet Connect\n\n";
print "Username: ";
chop($user=<STDIN>);
system("stty -echo");
print "Password: ";
chop($pass=<STDIN>);
print("\n");
system("stty echo");
print "\nSelect phone number to connect to:\n";
@tels=("096588388","096588388","096588188");
@telsinfo=("56K dialup","33.6K dialup","Business class");
$telin=@tels;
for ($i=0;$i<$telin;$i++) {
print $i+1,". ",$tels[$i],"\t($telsinfo[$i])\n";
}
chop($sd=<STDIN>);
if ( $sd <= $telin && $sd > 0 ) {
$tel=$tels[$sd-1];
}
else {
print "Wrong telephone selection, assuming first number\n";
$tel=$tels[0];
}
open(FIL,">/tmp/.chat$$");
print FIL "ABORT BUSY ABORT \'NO CARRIER\' \'\' \'AT S7=45 S0=0 L1 V1 X4
&c1
E1 Q0 X3DT",$tel,"\'\n";
print FIL "CONNECT \"\"\n";
print FIL "sername: ",$user," assword: ",$pass,"\n";
close FIL;

#system("/usr/sbin/pppd /dev/cua1 38400 connect \'/usr/sbin/chat -f
/tmp/.chat$$\' dns-addr 139.91.1.1 dns-addr 193.92.150.3 ");
system("/usr/sbin/pppd /dev/cua1 115200 connect \'/usr/sbin/chat -f
/tmp/.chat$$\' ");
system("rm -f /tmp/.chat$$");

-------------------------------

thanks


--
To unsubscribe send e-mail to suse-linux-e-unsubscribe@xxxxxxxx
For additional commands send e-mail to suse-linux-e-help@xxxxxxxx
Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/


< Previous Next >
Follow Ups