Side-by-side, interactive cheatsheets for Perl programmers
comparing Perl to other languages. Every example runs live in your browser — no
setup, no installation.
Choose your own path by reordering languages
What Perl programmers get when sigils disappear and a Promise takes over waiting. JavaScript keeps Perl's first-class regex literals and no-compile-step feel, but drops $/@/% sigils for one bare name per variable, replaces manual bless-based objects with a native class keyword, and adds a built-in async/await concurrency model Perl has no equivalent for at all.
$item-inside-an-@array inconsistencywantarray to reason aboutclass keyword with constructor() and #private fields, replacing hand-written bless-and-assign boilerplate and Perl's underscore-convention-only privacyconst { name, age } = person and `Hello, ${name}` replace Perl's hash-slice syntax and the @{[ expression ]} interpolation trickPromise and async/await — a genuine language-level concurrency primitive with no Perl core equivalent, which otherwise needs a CPAN event-loop module and manual callbackspackage-lock.json in place of CPAN and Carton's cpanfile.snapshot, with reproducible installs generated automatically rather than through a separate opt-in toolPerl's own favorite child for scripting and the web, Python keeps the quick-iteration, no-compile-step feel you know, but trades sigils and context sensitivity for one plain name per variable and a single, predictable meaning for every expression.
$scalar, @array, and %hash all collapse into one bare, unpunctuated namemap/grep chains with one readable left-to-right expressionclass keyword and real inheritance instead of manually bless-ing a hash reference@_The mandatory, fully-featured native OOP system Perl programmers have to hand-roll. Java trades Perl's sigils, context sensitivity, and bless-based objects for compiler-enforced static types, real encapsulation and generics, low-ceremony records, and a checked-exception contract Perl has no equivalent for.
package + hand-written blessdie never offersWhat Perl programmers get when sigils collapse to one and objects stop needing bless. PHP keeps Perl's PCRE-descended regex engine and pragmatic web-scripting roots, but drops $/@/% sigils for one $ prefix, separate array and hash types for a single ordered-map array, and manual bless-based objects for a native class keyword with constructor property promotion.
class keyword with constructor property promotion — public readonly string $name in the constructor signature replaces Perl's hand-written bless-and-assign boilerplate@_ into a hash to simulate Perl-style keyword argumentsuse lib path-juggling before requiring a dependencywantarray to reason aboutWhat Perl programmers get when the sigils and context sensitivity disappear. Ruby kept Perl's regex literals, postfix conditionals, and pragmatic soul, but dropped $/@/% sigils, scalar-vs-list context, and manual bless-based objects for a single uniform object model and a real class keyword.
$item-inside-an-@array inconsistencywantarray to reason aboutclass keyword — attr_accessor, initialize, and < for inheritance replace hand-written bless, manual accessors, and @ISAarray.each { |item| ... } replaces Perl's explicit anonymous-sub-and-arrow-call ceremony for passing behavior around