Ruby and Perl might have a number of similarities, but there are a number of features that makes them unique from each other.

In Ruby, you won’t encounter context-dependent rules like with Perl. The array literals go in brackets instead of parentheses. A variable isn’t the same as the object to which it refers in Ruby. Instead, it’s always seen just as a reference to an object. Ruby uses “def” instead of “sub”. Semicolons are not needed after each line. You end it up with ‘end’ instead. Diamond operators are not found in Ruby and fat commas are only used in hash literals.