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 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 aroundWhat 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 aboutThe structure you would otherwise recover with a regex, already there. Perl is the text-processing language: everything arriving at a program is a string, and structure is something you rebuild with split, a pattern and careful counting. Nushell's claim is that the pipeline should have carried the structure all along — so ls | where size > 1mb asks the filesystem nothing extra, and there is no line to parse.
printf and no column widths<=>-versus-cmp fork — sort-by age sorts numbers numerically because they are numbersparse "{name}={age}" returns a table with named columns, so captures never land in $1 and $2 waiting to be overwrittenopen config.json returns a record, not bytes — the from and to families convert between JSON, CSV, YAML and TOML in one command eachdef reads from the pipeline through $in, so it sits between two builtins as a real stage — something a Perl sub can never be