1. Home
  2. Computing & Technology
  3. Ruby

How Does Ruby Compare to Perl?

By , About.com Guide

A Philosophical Divide

Though they can be used for the same purposes, Ruby and Perl couldn't be more different. There is an underlying philosophical difference that creates an uncrossable rift between them. One of Perl's guiding concepts is "there is more than one way to do it" (often shortened as TIMTOWTDI).

Perl's Flexible Design

Perl was designed to provide as many paradigms, tools and language features as possible to programmers, including those which may not be used now, but might prove useful in the future. For example, among other ways, Perl can be used as a normal imperative language like BASIC, a structured language like C , a clone of the AWK text processing language, a functional language something like Lisp or as an object oriented language.

The Ruby Way

In contrast to Perl's TIMTOWTDI perspective, a phrase often heard in the Ruby community is "the Ruby way." Not quite a rigid set of rules, "the Ruby way" is a set of conventions used by Ruby programmers to explain the natural way of doing things with Ruby.

Most programmers only use one paradigm and having so many unused features tends to confuse things. Unlike Perl, Ruby was designed as an object-oriented language. While it does incorporate some non-object oriented features, they were included because they were deemed useful at the time, not because they might be useful down the line.

Explore Ruby
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Ruby
  4. Beginning Ruby
  5. How Does Ruby Compare to Perl?

©2009 About.com, a part of The New York Times Company.

All rights reserved.