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 &`; }

In reply to GQKat (GoRN'z CueCat) by GoRN

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.