Qore is not Perl; Perl is a robust, mature, feature-full, and powerful language, and Qore is new and relatively young and differs philosophically in most areas.

Perl is (IMO) a fantastic text processing language, whereas Qore was designed to facilitate interfacing, developing scalable multi-threaded programs/scripts, and logic embedding.

(Some) similarities to Perl 5:

  • Both are weakly-typed scripting languages (Qore now supports optional hard typing similar to Perl 6 as of Qore 0.8.0 and much improved as of Qore 0.8.3)

  • Qore variable references begin with a dollar sign "$". (ex: $value is a valid variable in both Perl and Qore), unless the "%allow-bare-refs" or "%new-style" parse directives are used in Qore, in which case the "$" prefix may not be used to identify variables

  • In both languages, subroutines are declared with the keyword sub

  • Both share many statements (like for, foreach, while, do, if, etc)

  • Both share many basic operators

  • Both use double-precision floating point numbers

  • Qore uses PCRE to provide Perl5-compatible regular expression support

  • Qore supports closures and binding local variables in the closure's scope (and so does Perl)
  • Qore (as of version 0.8.5) supports universal lvalue references, even references to local variables that are usable in multi-threaded contexts.  Also Qore supports "call references" (which are something like "function pointers") as well.

(Some) differences from Perl 5 (note that I have been informed that Perl 6 has many similar features to Qore):

  • Qore has a clean and powerful threading model, built-in from the start by design.  In Qore, local variables are thread-local, everything else is globally shared between threads.

  • Qore has clean object-oriented features, built-in from the start by design

  • Qore has transparent UTF-8 support (qore's substr(), string splice, index(), reverse(), etc work on character offsets, not byte offsets according to the character encoding used for the string), Perl's wide character support is not respected in every function - for example, 'printf("%s\n", substr("ä", 0, 1));' will output an invalid character in Perl, but work properly in Qore, even when the character encoding is set to UTF-8 and when multi-byte characters are used

  • Qore tends to avoid syntactic shortcuts and require more verbose expressions than Perl; Qore has a much smaller grammar than Perl, and no default variables (no $_, etc); Qore has if statements, but no "unless"; Qore has my but no "local", etc.  This has the effect that Qore programs/scripts are easier to read than some Perl programs.

  • A Qore variable can be of any type, whereas in Perl the type of variable also depends on the name

    Perl:

    @array = (1, "two"); 
    %hash = ( "a", 1, "b", 2);
    $scalar = 3.0;

    Qore (without the "%allow-bare-refs" or "%new-style" parse directives):

    $array = (1, "two");
    $hash = ( "a" : 1, "b" : 2);
    $scalar = 3.0;
  • Qore subroutines can be declared with an optional list of local variables to receive subroutine arguments; the parentheses after the subroutine name are not optional.

    Qore (without the "%allow-bare-refs" or "%new-style" parse directives):

    sub function($arg1, $arg2) { 
    }

    Perl:

    sub function {
    my $arg1 = shift;
    my $arg2 = shift;
    }
  • Qore requires parentheses for every function call, even if there are no arguments; with Perl they are optional
  • Qore accepts a statement or a statement block after if, while, for, foreach, etc, like C, C++, and Java, but unlike Perl that requires a block ("{" "}") after such statements.

  • Qore's splice operator works on strings (respecting character offsets for multi-byte character encodings) as well as lists.

  • Qore has a switch/case statement, whereas Perl has none.  Qore's switch/case statement accepts all data types and even simple comparison operators in addition to regular expressions:

    switch ($expression) {
    case "string":
    case > 2007-01-05:
    case /^abc$/:
    default:
    }
  • Qore hashes must be specified with a specific syntax, ex:

    ("key": expression)
  • Qore's exception handling is more similar to C++ or Java's.

  • Qore has very tight database integration and syntactic support for processing query results (context statements, find expressions) and built-in support for database-independent programming

  • Because qore does not support many automatic variables, Qore implements a special syntax for subpattern extraction in regular expressions (i.e. $list =~ x/(pattern1...)/)
  • Qore uses 64-bit integers by default even on 32-bit platforms.

  • Qore's operators can change lvalues without references, in Qore a function can change an lvalue only if a reference is passed

  • Qore supports safe signal handling as well.