<!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. 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. If not, see <http://www.gnu.org/licenses/>.<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 => "callsign.ualr.edu", Port => 2000, Timeout => 10,<br> errmode => \&error );<br>$t->open();<br>$t->waitfor('/LOOKUP>.*$/');<br>$t->print($ARGV[0]);<br><br>$_ = $t->getline(); # blank line<br>$_ = $t->getline(); # call<br>error() if (m/No match found/);<br><br>$_ = $t->getline(); # name<br>chomp; s/.+,\s+//; s/\s.+$//;<br>print "\$NAME$_";<br>$_ = $t->getline(); # addr<br>$_ = $t->getline(); # qth<br>chomp;<br>$_ =~ ",";<br>$_ = $`;<br><br>print "\$QTH$_\n";<br><br>$t->waitfor('/LOOKUP>.*$/');<br>$t->print("bye");<br><br>snip------------------------------------------------<br><br></body></html>