Sophie

Sophie

distrib > Fedora > 14 > i386 > by-pkgid > d56e2615a43e036877e0b6cfab8e0892 > files > 524

fldigi-doc-3.20-3.fc14.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"><title>ualr-telnet</title></head>
<body>snip ------------ copy the following to ~/.fldigi/scripts/ualr-telnet.pl<br><br>#!/usr/bin/perl<br><br># Author: Stelios Bounanos, M0GLD<br># Date: 20090103<br>#<br># ualr-telnet is free software; you can redistribute it and/or modify<br># it under the terms of the GNU General Public License as published by<br># the Free Software Foundation; either version 3 of the License, or<br># (at your option) any later version.<br>#<br># ualr-telnetl is distributed in the hope that it will be useful,<br># but WITHOUT ANY WARRANTY; without even the implied warranty of<br># MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.&nbsp; See the<br># GNU General Public License for more details.<br>#<br># You should have received a copy of the GNU General Public License<br># along with this program.&nbsp; If not, see &lt;http://www.gnu.org/licenses/&gt;.<br># ----------------------------------------------------------------------------<br><br>use strict;<br>use warnings;<br><br>die "Usage: $0 CALLSIGN\n" unless (@ARGV == 1);<br><br>use Net::Telnet ();<br><br>sub error { print "\$NAME?\$QTH?\n"; exit(1); }<br>my $t = new Net::Telnet( Host =&gt; "callsign.ualr.edu", Port =&gt; 2000, Timeout =&gt; 10,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;errmode =&gt; \&amp;error );<br>$t-&gt;open();<br>$t-&gt;waitfor('/LOOKUP&gt;.*$/');<br>$t-&gt;print($ARGV[0]);<br><br>$_ = $t-&gt;getline();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # blank line<br>$_ = $t-&gt;getline();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # call<br>error() if (m/No match found/);<br><br>$_ = $t-&gt;getline();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # name<br>chomp; s/.+,\s+//; s/\s.+$//;<br>print "\$NAME$_";<br>$_ = $t-&gt;getline();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # addr<br>$_ = $t-&gt;getline();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # qth<br>chomp;<br>$_ =~ ",";<br>$_ = $`;<br><br>print "\$QTH$_\n";<br><br>$t-&gt;waitfor('/LOOKUP&gt;.*$/');<br>$t-&gt;print("bye");<br><br>snip------------------------------------------------<br><br></body></html>