Uh ... The answer to Sinan is completely too studied to my taste, at least in the last 12 hours :)
So, I will give a shorter and slightly smaller Perly, just for the sake of variety.
Your question is not entirely about Perl , as far as I can tell, and can be just as easily considered in another form: "Why use C ++ and OOP in it when C already has structures?"
In other words, you seem to be wondering what the use of the OOP paradigm means.
The answer, of course, helps solve some software development problems, rather than purely procedural programming. Focus on certain - OOP is not a panacea for every problem, nothing more than ANY method / approach / paradigm.
Using OOP (in the form of packages as classes and blissful hashes as objects in Perl) allows you to take advantage of inheritance, polymorphism and other OOPyish mumbo-jumbo, which you are probably already quite familiar with. You are not Perl OOP Experience.
Can you do 100% of what you would do with a blessed object with a clean data structure? Absolutely. Will 100% of this code be simple and short / readable / supported as you can achieve using objects? Most likely not, although it depends on how well your OOP code actually takes advantage of the benefits that OOP provides (BTW, I have , which supposedly have OOP code (Perl and not), which actually had no advantage OOP and it might have been easier to read and understand if it had been deprived of its OOP chromium).
DVK
source share