Honestly, if you are new to OOP, you might want to start the way I did. It is Very Basic, and does not really use all the functionality (actually only properties), but at least can get you to understand how to build an object from scratch and how to work with the references to it. (BTW thanks all of you who were patient with me a while back when I was asking these same questions)

We have good ol' web(non)sense here at work, which as probably a few of you know, is blind to external proxies.

I found a site in Russia that lists proxy ip's and ports that are open for free use. I thought that was nifty, but it was a pain for me to keep checking it. Enter perl!

I did some research in CPAN and was disappointed to see the lack of win32 ping modules (or i missed them) that provided response time. I decided to do it the Dirty Way.I ended up snarfing the page using an object and its methods from Win32::Internet, parsed it to get what i needed (good regex use too) and built an object with that data to contain ip,port,responsetime, and lost packets.

I then backtick a win32 ping command and parse for response time and packet loss, adding the data to the object.

Afterwards, a report is generated and I am good to go.

It helped me so much to understand what I am doing. And yes, before I get hit with the badstick, it is slow, gawdawful and ugly, but it was a great learning project.


In reply to Re: Beginner's Object Orientation Exercises? by Silicon Cactus
in thread Beginner's Object Orientation Exercises? by munchie

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.