A while after having my current job, my boss decided to bestow upon me the great task of printing out all of our DNS entries (300 or so - a hosting company). Of course he told me that there was no "easy" way, and to just print them page by page (BACKGROUND: we use a colbat qube for our DNS, so this was done via a pretty web GUI). 300 entries later, I was done, but now he wanted the whois report for every one! ugh! I wasn't going to take this on up the butt. I got the dns entries from the box (the actually files from /etc/named), and made a list with them using perl (Victory 1). Then I needed to do a whois on everyone and print it out.
Boss: I know of this ASP whois program that would work good for this a +nd it only costs $40! Me: Funk that. We use perl.
So I decided to get tricky. I went to CPAN, and found a few Whois modules (I ended up on Net::Whois::Raw, hehe, this is before I knew about the unix whois command though :/ ), then I found out our OkiData printer had a print server with an open TCP/IP port! Yay! A little bit of help from IO::Socket (/me drools), cacharbe, and OkiData's support site, I had a script that printed out 300 whois' in one nite! w00t! He normally asks me first before considering asp now :)

__________________________________________________

s mmgfbs nf, nfyojy m,tr yb-zya-zy,s zfzphz,print;

mexnix.perlmonk.org

Edit by tye to change PRE around long lines to CODE


In reply to Re: Small Victories for Perl by mexnix
in thread Small Victories for Perl by dws

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.