I agree with BrowserUK. However, if you need a slogan, I'll give you one.

Procedural Programming is based on putting together subs that work on data as parameters. The smarts is in the procedures, that may behave differently depending on what kind of data you pass them. Object Oriented Programming is based on linking together smart data, the objects, that know how to manipulate their own data themselves. So the smarts is in the objects.

You can do the same, programmingwise, in both. However, the organization of the code is inside out for one compared to the other.

For example, if you were to implement addition in procedural programming, you'd put the code for adding integers, floats, complex numbers, matrices... all together. And the codes for subtration would be put somewhere else, and yet another place for multiplication...

In object-oriented programming, you'd place all operators/routines for integers together, and all operators for floating point in another place, for matrices yet somewhere else... Inside out.


In reply to Re: Procedural and Object Oriented Perl Code by bart
in thread Procedural and Object Oriented Perl Code by Anonymous Monk

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.