Mailinglist Archive: opensuse (2234 mails)
| < Previous | Next > |
Re: [SLE] Perl Script
- From: johnnick@xxxxxxxx (John Nickerson)
- Date: Sat, 18 Sep 1999 15:54:18 -1000
- Message-id: <37E4424A.8CA906D2@xxxxxxxx>
tabanna wrote:
>
> 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
Did you put "#!/usr/bin/perl" at the start of your program?
Basic, but I needed to ask? :~)
--
John H. Nickerson
Sometimes a little inaccuracy saves a ton of explanation
--
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 > |