Note, the # means instance method when discussing ruby code. It’s not valid syntax.
Ruby allows you to be extremely concise, while maintaining readability for anyone moderately familiar with the language. In a way Perl is most definitely not.
Short example:
arr = [<blog posts objects>]
# Author may be nil
number_of_authors = arr.map(&:author).compact.uniq.count
You can imagine how easy it is to throw data around with very little code. Loops are abstracted, so you never think about them as loops. Instead you just see data moving around.Edit: A few languages (like JavaScript) implement this behavior explicitly by passing anonymous functions as callbacks.