This lets you use those cool bar code readers from Radio Shack (the free ones), the homepage is gorn.8m.com. Have fun.
#!/usr/bin/perl -w if ($ARGV[0]) { $BROWSER = $ARGV[0];} else {$BROWSER = 'netscape';} $debug = 0; if (open(CODE, "$ENV{'HOME'}/.gqkatcode")) { $code = <CODE>; chomp $code; close(CODE); } else { print ":Cue:Cat requires registration..\n"; print "Enter the ID Number you get When ready\n"; print ":Cue:Cat ID: "; &openBrowser('http://net.c-me-register.com/'); $code = <STDIN>; open(CODE, "$ENV{'HOME'}/.gqkatcode"); print CODE $code; chomp $code; close(CODE); } print "Skan the the :Kue:Kat: "; $barcode = <STDIN>; chomp $barcode; $barcode = substr $barcode,0,-1; print $barcode if $debug == 1; $barcode = substr $barcode,7; $barcode =~ tr/a-zA-Z/A-Za-z/; print $barcode if $debug == 1; #@data = `links -source 'http://u.dcnv.com/CRQ/1..$code.04.$barcode.0' +`; use IO::Socket; $dcnv = IO::Socket::INET->new( Proto=> "tcp", PeerAddr => "u.dcnv.com", PeerPort => 80) || die "Can't Connect To U.DCNV.com: $!"; $dcnv->autoflush(1); print $dcnv "GET /CRQ/1..$code.04.$barcode.0 HTTP/1.1\r\n"; print $dcnv "Host: u.dcnv.com\r\n"; print $dcnv "User-Agent: Mozilla/4.0 (compatible; MSIE 5.0)\r\n"; print $dcnv "Accept: */*\r\n"; print $dcnv "Accept-Charset: us-ascii, ISO-8859-1, ISO-8859-2, ISO-885 +9-4, ISO-8895-5, ISO-8859-13, windows-1250, windows-1251, windows-125 +7, cp437, cp850, cp852, cp866, x-cp866-u, x-mac-ce, x-kam-cs, x-koi8- +r, x-koi8-u, utf-8\r\n"; print $dcnv "Connection: Keep-Alive\r\n"; print $dcnv "\r\n"; while($foo = <$dcnv>) { if ($foo =~ /^url\=/) { $url = $foo; $url =~ s/^url\=//; close($dcnv); } } close($dcnv) if $dcnv; &openBrowser("$url"); sub openBrowser() { $URL = $_[0]; chomp $URL; `$BROWSER \'$URL\' &> ./test &`; }

Replies are listed 'Best First'.
(Guildenstern) RE: GQKat (GoRN'z CueCat)
by Guildenstern (Deacon) on Sep 05, 2000 at 04:03 UTC
    I would be wary about using and posting this code. There's a recent /. story about someone who wrote a similar utility and received nasty cease and desist letters from Digital Convergence.
    I've got no heartache with people writing this kind of stuff, but seeing how Digital Convergence has been reacting, I'd hate to see PM get in trouble.

    Guildenstern
    Negaterd character class uber alles!