Perl is awesome. Perl’s docs are awesome. The Perl community is …awesome.For those Perlers who long for elegant OO features built-in from the beginning, Ruby may be foryou.
As with Perl, in Ruby,…
%q{this} (single-quoted), or%Q{this} (double-quoted), and%w{this for a single-quoted list of words}.You%Q|can|%Q(use)%Q^other^ delimiters if you like."looks#{like} this" (and you can put any Ruby code you like inside that#{}).`backticks`.Unlike Perl, in Ruby,…
$ and@ are used as the first character invariable names sometimes, rather than indicating type, they indicatescope ($ for globals,@ for object instance, and@@ for class attributes).def instead ofsub.end keyword.foo.to_i,foo.to_s, etc., if you need to convert between types.eq,ne,lt,gt,ge, norle.<>).You usually useIO.some_method instead.=> is only used for hash literals.undef. In Ruby you havenil.nil is an object (likeanything else in Ruby). It’s not the same as an undefined variable. Itevaluates tofalse if you treat it like a boolean.false andnil evaluate to a falsevalue. Everything else is true (including0,0.0, and"0").